-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
The "fill rule" is a common parameter in 2D rendering engines to control how overlapping areas in a path are filled.
Examples from other libraries:
- SVG: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule
- Canvas: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fill
- Cairo: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-set-fill-rule
- CoreGraphics: https://developer.apple.com/reference/coregraphics/1454865-cgcontexteofillpath
- .NET: https://msdn.microsoft.com/en-us/library/system.windows.media.pathgeometry.fillrule(v=vs.110).aspx
Currently, p5.js does not provide control over the fill rule. However, the underlying rendering library supports it, so adding it is relatively easy.
This was implemented in pull request #1729. This PR added a fillRule function to select NONZERO or EVENODD fill rules. The PR was closed as "out of scope." I am opening this issue to encourage discussion.
colormotor
Metadata
Metadata
Assignees
Labels
No labels
