Closed jwoLondon closed 2 years ago
Any fill style is affected.
I'd love to see a fix for this. Currently, combineNestedSvgPath
cannot really be used due to this.
I'm working on improving algorithm to support this. Sorry for the late response. Infant baby = neglect open source :(
I have it working! https://twitter.com/preetster/status/1457242142481338368?s=20 Will merge and release after some more testing
Fixed by https://github.com/rough-stuff/rough/pull/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.
Likely related to #165 and #167: For nested holes and islands when setting
combineNestedSvgPaths: true
, I see leaking of the hachures at themoveTo
vertex of each sub-path.See this interactive minimal reproducible example
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).