[cairo] operator_xor.cairo snippet
Carl Worth
cworth at cworth.org
Fri Oct 29 14:12:46 PDT 2004
On Fri, 2 Jul 2004 10:20:04 +0200 (CEST), Roman Bednarek wrote:
> I have installed the current cairo_snippets examples, and operator_xor
> does not work. It is not implemented yet? or there is another problem?
I believe it does work. The results are shown here:
http://cairographics.org/samples/operator_xor.html
But one essential thing to understand is that CAIRO_OPERATOR_XOR
implements the Porter/Duff compositing operator named XOR. It does not
implement a logical bitwise exclusive OR.
This is a common misunderstanding and their has been a recent proposal
to eliminate or at least rename this operator in cairo to avoid this
problem.
More details on the semantics of the Porter/Duff XOR operator can be
found in their paper, of which a copy is available at:
http://keithp.com/~keithp/porterduff/
-Carl
More information about the cairo
mailing list