CairoSVG
CairoSVG copied to clipboard
Option to Union overlapping shapes
Is it possible to add an option to union the overlapping shapes before converting?
I don’t know. Maybe there’s such a feature in Cairo, but it’s unlikely. What’s your use case?
So I use CairoSVG to vectorize Persian text and import it into programs that don't support Persian directly. The vectorizing part works perfectly. There are only overlapping characters which will behave strange in graphic software when extruding.
To fix this right now, I have open Inkscape and use Union before importing into the graphic software. It would be really nice to have a union option.
Oh, OK, very interesting!
Qt seems to support that through the united operator in the QPainterPath. Maybe you could use a similar code to do that, even if Cairo does not support it directly.
Actually, there are libraries for that in python: https://stackoverflow.com/questions/2667748/how-do-i-combine-complex-polygons