Miter Path

Miter Path

Forum member · Nov 21, 2007
Why can't I get my path the miter? Dim x As Single = (points(0).X + ox) * sx Dim y As Single = (points(0).Y + oy) * sy pa = New Path(x, y) pa.LineWidth = 1 pa.LineJoin = LineJoin.Miter For p As Integer = 1 To UBound(points) x = (points(p).X + ox) * sx y = (points(p).Y + oy) * sy pa.SubPaths.Add(New LineSubPath(x, y)) Next pa.ClosePath = True pg.Elements.Add(pa)

Re: Miter Path

Support · Nov 23, 2007
I am not clear the exact issue that you are having. There are three line join styles: Miter, Round and Bevel. You have specified a LineJoin of Miter. The Miter join type will just extend the outer edges of the two line segments until they meet. Keep in mind that if the line segments meet at too sharp of an angle a limit, know as a MiterLimit, will be imposed. The MiterLimit (which is a property that can be set) will bevel a line join after a maximum miter length. Now I did not have your exact X and Y coordinates to test but I did but a test example very close to how you were doing it using my own arbitrary X and Y values and I did not see any issues with the paths or their line joins. I tested all three LineJoins with the following code: Dim MyDocument As ceTe.DynamicPDF.Document = New ceTe.DynamicPDF.Document Dim MyPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page() Dim pa As Path = New Path(0, 0) pa.LineWidth = 1 pa.LineJoin = LineJoin.Miter 'pa.LineJoin = LineJoin.Round 'pa.LineJoin = LineJoin.Bevel pa.SubPaths.Add(New LineSubPath(200, 20)) pa.SubPaths.Add(New LineSubPath(400, 400)) pa.SubPaths.Add(New LineSubPath(10, 20)) pa.ClosePath = True MyPage.Elements.Add(pa) MyDocument.Pages.Add(MyPage) MyDocument.DrawToWeb("LineJoinTest.pdf") If you have further questions or I did not fully address your issue feel free to ask or provide more detail. Thanks, ceTe Software Support Team