Skip to content

Commit b5901a6

Browse files
authored
Fix endShape() to Properly Close Paths and Prevent Shape Merging
1 parent 389b77d commit b5901a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/p5.Renderer2D.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ class Renderer2D extends p5.Renderer {
855855
this.drawingContext.lineTo(vertices[i + 1][0], vertices[i + 1][1]);
856856
}
857857
this._doFillStrokeClose(closeShape);
858+
this.drawingContext.closePath();
858859
}
859860
} else if (
860861
isBezier &&

0 commit comments

Comments
 (0)