Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
New zig-zag fill algorithm does not work as well for my use case #148
Comments
|
Are you rendering svg path? |
|
Yes, it's a SVG path from a font. |
|
can you share the SVG path string? In the meantime you can revert to the older version of roughjs or only use hachure/cross-hatch/non-zigzag fills for now. zigzag has been a difficult problem to solve for all sorta shapes :( |
|
I would imagine it's difficult! When I initially tried it, I was actually shocked how well it worked. Here are some samples that cause issues:
|
|
Thanks I will take a look. |
|
Thanks for looking into it! I'm perfectly happy with the old version for now, just did some semver range upgrades :) and noticed this. |
|
Turns out I had published the wrong branch 🤦🏻♂️ - perils of publishing at 1am. |
|
Btw this only happens on certain hachure angles for your shape. If you set the angle to 45 |
|
I think I have solved this. It may not look the cleanest in small tight shapes like yours but it will not leak out. May revisit the algorithm again in the future. |
This worked quite nicely before, but now it looks like this:
I can extract some sample code if it is helpful for debugging.