Path intersection, union, difference code
Hey guys,
I'm writing a program that generates SVGs. I realized how big of a pain paths are. Right now I am basically just doing straight lines. The curves that I do have are radii and they're all 90 degree semi circles. Those were a pain too, luckily I stumbled upon http://www.whizkidtech.redprince.net/bezier/circle/ and I can create them in my paths.
Anyway, I'm at the point where I need to start doing some more complicated things. I can do these things easily in Inkscape but I'm finding it difficult to generate the path data directly. I am wondering where in the source of Inkscape I can find the routines that do the intersection, union, and difference of paths so that I can incorporate it into my code.
Thanks, ~Eric
On Tue, May 6, 2008 at 12:14 PM, Frederich, Eric P21322
Anyway, I'm at the point where I need to start doing some more complicated things. I can do these things easily in Inkscape but I'm finding it difficult to generate the path data directly. I am wondering where in the source of Inkscape I can find the routines that do the intersection, union, and difference of paths so that I can incorporate it into my code.
Currently we use code in src/livarot for that, but it's old and messy. The new 2geom library, which is also available separately at http://lib2geom.sourceforge.net/, is more likely to be helpful to you. You can always contact lib2geom developers for help.
participants (2)
-
bulia byak
-
Frederich, Eric P21322