-
Notifications
You must be signed in to change notification settings - Fork 198
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
stroke path calculation seems broken in certain case #57
Comments
I've also bumped into this. Given this SVG (uploaded as a zip since GitHub refuses to attach SVGs): the following output is observed (ignore the clipped bottom of the frame): The correct output should look like this (ignoring discrepancies in line joins, which pathfinder doesn't implement yet): This SVG includes both closed and open paths. Observed issues:
I have seen similar issues when using Pathfinder in an OpenGL ES renderer I'm working on, with much more complex graphics. The above SVG renders with identical problems in my renderer as well. @pcwalton What are your thoughts? |
Interesting, thanks for the report! I'll take a look. |
…ting the intersection of self-intersecting line segments. Partially addresses #57.
I believe this is all fixed. Thanks for the bug report! |
On further inspection, it appears that the spiral shape only shows up when using XCAA. Under other modes it doesn't appear. |
It appears that some new problems have appeared as a result of these fixes. Before the fixes, this svg (a stroked and filled path generated from some text in Inkscape) looked like this (using XCAA): Now it looks like this: and with no anti-aliasing, it looks like this: For reference, all browsers I tried it on rendered it natively like this: |
@dylanede Did you rebuild the demo with |
Ah, it's possible that I didn't. That could explain it. When I'm back at that machine I'll check. However with the other problem (the strokes in the "Testing" image) I have seen similar behaviour in my own renderer after updating the dependency on pathfinder, so it's not affected by changes in the client. |
These extra points are unnecessary and can confuse the partitioner, because they sometimes prevent it from detecting winding numbers properly. This is a bug in the partitioner and should be fixed, but we shouldn't be generating these points to begin with. Partially addresses #57.
Seems when using the new stroke logic, every |
Oops, it seems that I need to consume the stream once again in a new PathBuffer to make the numbers correct. Ignore my last report please |
Seems the svg demo renders wrong stroke path. Maybe pathfinder_path_utils::stroke is giving wrong endpoints in this case?
The text was updated successfully, but these errors were encountered: