-
-
Notifications
You must be signed in to change notification settings - Fork 616
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
Wrong filling for particular path in 4.x #153
Comments
This may be related to your other bug with Also, the way you are drawing is just not efficient. Why don't you just draw 64 squares as opposed to a non-optimized path? Anyways I will see why it's happening. It could also be that your path is actually multiple sections so it gets really tricky to fill . |
I'm not the author, and I also don't quite understand why he choosed to do it that way. (here's the source) It might well be related to the other bug, however this isn't the exact same path, this one hasn't been minified with svgo. |
The new algorithm estimates a single polygon out of a SVG path. Your Path has several unconnected paths and some paths are nested within the outer path. Since they are all in a single path, it is a single polygon. I will have to create a special case for this. Sorry about this. but it may take some time to figure out the best way. I would suggest draw individual squares or revert to the older version of roughjs as it may work better for you. The new version only has new svg optimization which is a problem for your case, so you wont be missing out on anything by using an older version. In the meantime I will keep this bug open to resolve it |
Hello @pshihn Regards, |
If it can ease your tests, I made a version of the wired icon generator with rough 4.3.0, available here: You can compare with the rough 3.1.0: For instance if you load the provided example (it's the "build" icon from the Material SVG iconset), here are some differences: Fill: solidFill: zigazgHope it can help you, wish you all the best! Regards, |
It's a checkerboard; The filling algorithms are giving expected result in
3.1.0
, but failing in newer version (tested on4.2.3
).Fiddle to replicate:https://jsfiddle.net/8qscjo1n/
The bug affects ell
fillStyle
algorithms. But careful, path is quite long, so usingdots
can crash the page.The text was updated successfully, but these errors were encountered: