[cairo] How to draw a inverted area?

Carlos Garcia Campos carlosgc at gnome.org
Mon Jun 7 03:03:58 PDT 2010


Excerpts from Magicloud Magiclouds's message of lun jun 07 09:44:10 +0200 2010:
> Hi, sorry the subject is not clear.
> I mean that, first I draw something in the cairo context, then I draw
> a circle in it, which acts like a invert mask. All colors in its area
> are inverted.

I think filling with white with the difference operator is what you
want

cairo_set_source_rgb (cr, 1., 1., 1.);
cairo_set_operator (cr, CAIRO_OPERATOR_DIFFERENCE);
cairo_fill(cr);

> I thought xor operator helped, but it did not....
> Thanks.

Regards, 
-- 
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100607/47ebc280/attachment.pgp>


More information about the cairo mailing list