Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Leaking' hachures in nested polygons #183

Closed
jwoLondon opened this issue May 22, 2021 · 4 comments
Closed

'Leaking' hachures in nested polygons #183

jwoLondon opened this issue May 22, 2021 · 4 comments

Comments

@jwoLondon
Copy link

Likely related to #165 and #167: For nested holes and islands when setting combineNestedSvgPaths: true, I see leaking of the hachures at the moveTo vertex of each sub-path.

See this interactive minimal reproducible example

leakingHachures

As an aside, I only recently discovered the combineNestedSvgPaths option by looking at the source code. I couldn't see it in the API documentation. I may have missed it, but it would be nice to have the option of setting the type of fill rule (non-zero; even-odd; always).

@fskpf
Copy link

fskpf commented Jul 18, 2021

Any fill style is affected.

I'd love to see a fix for this. Currently, combineNestedSvgPath cannot really be used due to this.

@pshihn
Copy link
Collaborator

pshihn commented Nov 3, 2021

I'm working on improving algorithm to support this. Sorry for the late response. Infant baby = neglect open source :(

@pshihn
Copy link
Collaborator

pshihn commented Nov 7, 2021

I have it working! https://twitter.com/preetster/status/1457242142481338368?s=20
Will merge and release after some more testing

@pshihn
Copy link
Collaborator

pshihn commented Nov 8, 2021

Fixed by #195 Releases as v4.5.0 on npm.
Note roughjs only does even-odd fills. The combineNestedSvgPaths was a stop gap hack, which is why it was not documented. That property is ignored now.

@pshihn pshihn closed this as completed Nov 8, 2021
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

No branches or pull requests

3 participants