Awesome, thanks! The biggest thing I can think of would be automatic compensation for the viewbox. Given a viewbox that rescales and/or translates the svg, apply that import transformation to the paths to give the true paths in real-world units. Both inkscape-silhouette and ink/stitch have to do that since they work with machines in the real world.
Another useful thing, now that I think about it, would be a class wrapped around guides. The current code just gives you the guide XML elements (I think?), which is useful as is, but there's room for so much more awesomeness. When I tried to interpret guides, especially the angle, my code got really confusing, really quickly. It was almost as if the X and Y terms for the guide angle were reversed, or at least that was my impression. It'd be cool not to have to think about that.
I'm on vacation now but I'll try to file issues when I can.
On April 17, 2018 7:54:00 PM Martin Owens <doctormo@...400...> wrote:
On Tue, 2018-04-17 at 18:09 +0000, Lex Neva wrote:
Although I'm currently working on an updated API which should make
it easier to discover the functionality. Come talk to me over at http s://gitlab.com/inkscape/extensions/
Oh my, that sure is an interesting repo! Just from a cursory look, I can see that there's a lot in there that I've had to implement on my own in Ink/Stitch, and a lot of other really awesome stuff. How stable an production-ready would you say that code is?
I ask because I'm in a great position with Ink/Stitch: I don't actually have to wait until this ships with inkscape to start using it in my extension. We're using pyinstaller, so we could easily just bring this repo with us in our packaged installation archives. If you tell me it's even somewhat stable, I might just switch over to it now.
That's very interesting news. I'm trying to get a handle on how feasible it would be to manage our extensions using setup.py and a target directory pip. But that installation method is a work in progress.
As for the API. The old API from inkscape 0.x is stable, but it's also a bit crusty and untested. I intend to support it using deprecation warnings as much as possible in the 1.0 spec, a lot of the changes are cleanups, upgrades and trying to collect code together into python classes.
I'd say I'm probably about 50% through the 1.0 cleanup right now. If you have time to review, now is a great time to have a think about what kinds of functionality you think should be available. Free free to create issues or merge requests in the GitLab project.
Best Regards, Martin Owens