Skip to content

Conversation

@fogleman
Copy link

This PR adds a fillRule() function and two constants, NONZERO and EVENODD, for controlling the fill rule used during fill operations. It is only implemented in the 2D context.

First PR for p5.js, let me know if more is needed.

Nonzero (default):

nonzero

Evenodd:

evenodd

@lmccart
Copy link
Member

lmccart commented Jan 7, 2017

awesome! this is useful but beyond the scope of the p5.js library at this time. perhaps this could be the basis of creating an addon library with some additional drawing helper functions. (if you're interested in that, see more info here)

in general, it's best to make an issue about a new feature before implementing so we don't have to close PRs unexpectedly.

@lmccart lmccart closed this Jan 7, 2017
@fogleman
Copy link
Author

fogleman commented Jan 7, 2017

Really? Fill rule is a very common feature in any drawing library. Indeed, it's just an extra parameter to the CanvasRenderingContext2D.fill() function. Why not expose that in p5.js? I don't see it being more at home in an add-on library. Can you explain your rationale for it being out of scope?

@subhog
Copy link

subhog commented Jan 18, 2021

Are there any news about this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants