Adding polygons

[email protected] Mon, 28 May 2018 21:53:37 -0400
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hello all!

I've encountered what seems like a simple use case, that for some reason I am unable to solve within my knowledge of Cairo.

I am trying to "add" (in polygon terms) two shapes. Each shape is drawn using a thick outline and a fill color. What should be drawn is a polygon that is a sum of both provided polygons.
In the attached sample the shapes are - a rectangle, and a pointed arrow with origin at rectangle center.

The sample is created using external polygon clipper. That's an acceptable solution for a simpler shape, but for shapes that include arcs, for example, external clipper is not very helpful
Is there a way to achieve the same effect using only Cairo functionality?

Help greatly appreciated!
--
CU

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
Screen Shot 2018-05-28 at 9.48.41 PM.png (image/png, 18.4 KB) - not displayed