[cairo] operator CAIRO_OPERATOR_XOR

Carl Worth cworth at east.isi.edu
Wed Jul 7 06:06:38 PDT 2004


On Wed, 7 Jul 2004 10:03:52 +0200 (CEST), Roman Bednarek wrote:
>    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?

No, there is not any way to implicitly save the background contents due
to an operator side-effect, (at least as far as I can tell). But we're
optimistic that things will be plenty fast enough that application
authors won't feel compelled to resort to hacks like that anyway.

For example, even apart from cairo, I'm beginning to notice that
applications are now often drawing selection boxes with things like
filled translucent rectangles rather than XORred outlines.

-Carl




More information about the cairo mailing list