-
Notifications
You must be signed in to change notification settings - Fork 139
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
Lacking support for paths made up of multiple subpaths #89
Comments
It looks good, I'll give it a try in the next couple of weeks. And hopefully the new features will get merged to the project. |
I think the nicer solution is to add a Move object and a Close object. Then you can still define the subpaths as series of PathSegments which is what you should want since that's actually how SVG does it. See: https://github.com/meerk40t/svg.elements for my implementation. Also the author of svg.path did it that way at my suggestion. Basically rather than subpaths you just define Move and Close as objects. Then subpaths come naturally from that. And it doesn't do weird stuff when you reverse it or whatever. |
Although there are some obvious subpath friendly operations like reverse just that subpath that are helpful with the other implementation which is why |
When you insert a segment into a path, how does it know on which side of the Move object to be inserted? Anyway, I've given up the idea of a pull request. I'm happily using/maintaining my fork on my own. If ever somebody wants it just give me a shout & I'll send you the latest version. By the way, YANG2020 folks! Let's get this man to the white house :) |
@vistuleB The segment you add inserts where you told it to insert.
It's up on pypi so Some of your own fork actually is sort of needed. I am certainly going to look into your implementations of supports |
Currently, svgpathtools cannot parse/render this kind of path:
The issue is that the path contains two 'Z's. Svgpathtools is not equipped to remember the middle Z. It will forget it, and print this instead to the file:
But (1) renders like so:
Whereas (2) renders like so:
Also, svgpathtools cannot parse/render this kind of path:
The issue is that the path contains an in-place move, which svgpathtools ignores. Svgpathtools will print this instead:
But (3) renders as
Whereas (4) renders as
Basically, one way or the other, svgpathtools doesn't know how to properly handle paths with multiple subpaths. In fact, a "subpath" class is entirely missing.
I have been preparing a fork over at https://github.com/vistuleB/svgpathtools to remedy these issues. I hope this fork will be the object of a pull request at some point. The changes are quite extensive though and right now I am still preparing the new README for the new fork.
Interested people can take a look. The fork contains other new capabilities, such as path offsets, strokes, conversion of elliptical arcs to bezier curves, and new SaxDocument capabilities.
Now would be a good time to give me feedback, before I make the pull request.
Thanks.
The text was updated successfully, but these errors were encountered: