Search code examples
cgcontextcgpath

Combining CGContext Geometry


Does anyone know if it is possible to combine (for example) different CGContext paths to create a new combined shape as in this example?

enter image description here

Thanks!


Solution

  • I found a library that does Union operations on CGPaths:

    https://bitbucket.org/martinwinter/vectorbooleancg

    I haven't tried it yet, but the author of the CG branch of Vectorbool, Martin Winter, states that the union operation should be usable in its current form on iOS. I will add information when I get around to trying to implement it.