Is there any way to build paths in Cairo by combining two paths together through Boolean operations such as Union, Difference, and Intersection? I'm working on a vector graphics application that uses Cairo to do its rendering and would like to give my users the ability to combine paths together in this manner, but I can't find a way to do it in Cairo.
+1
A:
Combining paths with operators does not make any sense to me. What do you get from "line AND curve OR arc"?
Instead, you can apply compositing operators by using cairo_set_operator()
: it will set how the current drawing operation (being it cairo_fill()
, cairo_stroke()
or whatever) should be mixed with the old content of the surface.
ntd
2009-10-08 22:12:38
An example of what I mean is the way Inkscape combines paths through boolean operations: http://www.usinginkscape.com/node/34. I suppose most of those effects could be achieved through a series of compositing operators, except that places where the two figures' paths intersect wouldn't necessarily have proper line joins.
Adrian Lopez
2010-03-19 05:02:20