We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bed3722 commit 558de97Copy full SHA for 558de97
1 file changed
src/ImageSharp.Drawing/Shapes/PolygonClipper/PolygonStroker.cs
@@ -62,14 +62,15 @@ public double MiterLimitTheta
62
63
public Polygon ProcessPath(ReadOnlySpan<PointF> pathPoints)
64
{
65
- for (int i = 0; i < pathPoints.Length - 1; i++)
+ for (int i = 0; i < pathPoints.Length; i++)
66
67
PointF point = pathPoints[i];
68
this.AddVertex(point.X, point.Y, PathCommand.LineTo);
69
}
70
71
- // This doesn't actually add the point. It triggers a close.
72
- this.AddVertex(pathPoints[^1].X, pathPoints[^1].Y, PathCommand.EndPoly);
+ this.AddVertex(pathPoints[^1].X, pathPoints[^1].Y, PathCommand.LineTo);
+ this.closed = 1;
73
+ this.Rewind();
74
75
double x = 0;
76
double y = 0;
0 commit comments