[cairo] operator CAIRO_OPERATOR_XOR
Roman Bednarek
roman at mikronika.com.pl
Wed Jul 7 01:03:52 PDT 2004
On Mon, 5 Jul 2004, Carl Worth wrote:
> On Wed, 19 May 2004 14:34:58 +0200 (CEST), Roman Bednarek wrote:
> > Is there any example with CAIRO_OPERATOR_XOR? I cannot make it work:-(
>
> Here's an example:
>
> http://cairographics.org/samples/operator_xor.html
>
> > When I add
> > cairo_set_operator (ct, CAIRO_OPERATOR_XOR);
> > to draw_shapes() in cairo demo the window is black(with only text), the
> > same happens in my program.
>
> An important point here is that CAIRO_OPERATOR_XOR is the Porter/Duff
> XOR compositing operator [1]. It is not a bitwise XOR operator.
>
> -Carl
Thanks for explanation. The bitwise xor operator was used mainly for
achiving "rubber-band" effect, when you draw something twice it
disappears. Is it possible to achive the same effect with cairo API? I
hope yes, so is there an example of this?
Roman Bednarek
More information about the cairo
mailing list