[cairo] Filling everything but the shape

Ricky Wood rickywoodster at yahoo.co.uk
Mon May 26 03:36:22 PDT 2008


I'm new to cairo and probably missing some obvious concept, please can someone enlighten me with this problem:

Basically, I have a surface with some shapes already drawn onto it.  I now want to paint every part of the surface a single colour except a circle, i.e. leave the contents of the surface, where the circle lies, undisturbed.

The approach I took was:

- create a mask
- paint the mask totally opaque
- fill a transparent arc on the mask
- set the colour on the source
- cairo_mask

I thought the source colour would be transferred to the destination, leaving the circle masked.

Where have I gone wrong, or is there a better approach?

TIA.


       
---------------------------------
Sent from Yahoo! Mail.
A Smarter Email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080526/516fb1ea/attachment.htm 


More information about the cairo mailing list