Skip to content

Commit 52c5312

Browse files
Update PolygonStroker.cs
1 parent 4561a3c commit 52c5312

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ImageSharp.Drawing/Shapes/PolygonClipper/PolygonStroker.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,13 @@ public double MiterLimitTheta
6262

6363
public Polygon ProcessPath(ReadOnlySpan<PointF> pathPoints)
6464
{
65-
for (int i = 0; i < pathPoints.Length - 2; i++)
65+
for (int i = 0; i < pathPoints.Length - 1; i++)
6666
{
6767
PointF point = pathPoints[i];
6868
this.AddVertex(point.X, point.Y, PathCommand.LineTo);
6969
}
7070

71+
// This doesn't actually add the point. It triggers a close.
7172
this.AddVertex(pathPoints[^1].X, pathPoints[^1].Y, PathCommand.EndPoly);
7273

7374
double x = 0;

0 commit comments

Comments
 (0)