-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
wip: clip pipes to tile polygons #101
wip: clip pipes to tile polygons #101
Conversation
this addresses gereleth#91 but it has its own glitches
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Needless to say, I'm looking at this because I think it could help with uniform pipe widths for penrose. But it would be great to fix the iOS rendering issues too. |
Since the clip paths are relative to the tile coordinate, we don't really need one An easy way to share them is just to memoize the clip paths. It would be nicer for debugging if the grid labeled them so that the ids are meaningful. |
not just visible also make clip path ids unique across all svgs because they share the page's namespace
Not sure why in opened a PR for this so early, guess I was just excited that it worked. Next week maybe I'll try putting it under a flag so it can be active only for iOS and for grids that need it. Personally I prefer the hairline to the smudge but that's just my opinion. |
I'm closing this because it needs a lot more work, as described above. Hope to return to this later. |
This is a work-in-progress fix for #91 rendering glitches on iOS.
iOS does not draw line ends correctly for the purpose of drawing pipes, never mind when
stroke-linejoin
and/or transformations are involved.There were some proposed extensions to SVG to fix all this, but the advice I have read is that you can do most of what you want to do with clipPath.
So here is a first attempt. We generate the clip polygon the same as the tile path, except without subtracting
border_width
from the radius. Right now it is also adding half a border width to the radius because I was still seeing 1px of grey on iOS without it.We also extend the pipes by 1.2 - probably more than needed, but we need a little stretch because iOS does not always draw all the way.
Before/after 📷 🧵