From: Shriramana S. <sa...@gm...> - 2012-09-04 09:35:07
|
On 9/3/12, Krzysztof Kosiński <twe...@gm...> wrote: >> in src/livarot/PathOutline.cpp seems relatively straightforward? I > > Yes, of course you can use it, as long as you comply with the > licensing of the relevant files. My program is going to be GPL. I suppose that's OK? Is there some GPL 2 vs GPL 3 problem involved? >> I also would like to know where the Path > Union function is >> implemented in livarot as I am unable to find this. > > src/splivarot.cpp, the relevant function is at lines 115-602. By the > way, the API of this function is extremely badly designed, as the > actual boolean code begins at line 239; the rest is just > error-checking and preparation. That's OK -- I'll try to extract just the stuff which I need. Basically if I get the algorithm it is enough for me since my Path and other classes are probably going to be different. BTW if union of two filled paths causes empty regions to be produced (think o overlaid on I), I suppose this function will include the inner "unfilled" paths also in the same output path object? (Currently this is what happens in Inkscape's GUI by clicking Path > Union but just confirming that this one function does everything that is needed.) Then I will just have to do the equivalent of "Path > Break Apart" (found sp_selected_path_break_apart at path-chemistry.cpp l 180). -- Shriramana Sharma |