Logical operations on the Cairo tracks?

Is there a way to build paths in Cairo by combining the two paths together using boolean operations like Union, Difference and Intersection? I am working on a vector graphics application that Cairo uses to render it and would like to give my users the ability to combine paths together this way, but I cannot find a way to do this in Cairo.

+5
source share
2 answers

I have not found a way to do this using cairo libraries. But this is a feature that I was looking for too. It would be definitely useful when (for example) stroking a combination of two paths - the linkers mentioned by ntd seem to be unable to do this.

In the meantime, I'm trying to write scripts for inkscape and let inkscape do the merging / distinction. Acceptable for the problem I'm working on, but definitely not for you. Are you lucky, either with Cairo or with any other svg library? After a couple of days of searching the Internet, this doesn't seem trivial: /

+2
source

The combination of paths with operators makes no sense to me. What do you get from the “line AND curve OR arc”?

cairo_set_operator(): , ( cairo_fill(), cairo_stroke() - ) .

0

All Articles