[cairo] Resend: Stroke a 'frame' around a complex shape based on several paths. Possible?
Vladimir Vukicevic
vladimir at pobox.com
Mon Mar 30 21:32:33 PDT 2009
On 3/30/09 12:21 PM, M Joonas Pihlaja wrote:
> If your fill pattern is not opaque then you can create temporary A8
> mask surfaces containing only a) the stroke, b) the fill, and then
> remove the fill-mask surface from the stroke-mask surface using
> OPERATOR_OUT/DEST_OUT. Then once you have the individual mask
> surfaces you can use cairo_mask() to paint them onto the target with
> whatever source pattern you want even if it has non-opaque bits.
If you can do the fill with the EVEN-ODD fill rule, you should be able
to do the fill, then add a big rectangle to your path around everything
(maybe the size of your surface?), clip, and then redo the path and
stroke. (Right?) EVEN-ODD won't work for the case described though
(overlapping rectangles), so the mask solution is probably the only
approach.
- Vlad
More information about the cairo
mailing list