Re: CAIRO_OPERATOR_XOR documentation

Bryce Harrington <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Mon, Apr 06, 2015 at 06:36:53PM -0700, Richard Billington wrote:
> If I interpret this correctly (quoting from
> http://cairographics.org/operators/):
> 
>    Resulting alpha (aR)    Resulting color (xR)
>    aA + aB − 2·aA·aB    (xaA·(1−aB) + xaB·(1−aA))/aR
> 
> If the alpha value for both A and B is 1, then nothing will be drawn
> anywhere? That is, I have something drawn on surface A with alpha at
> 1.0, and I have something on the receiving surface drawn with alpha
> at 1.0. This results in aR = 0.0 so everything in B becomes
> transparent?

Check the truth table for XOR:

    https://en.wikipedia.org/wiki/Exclusive_or

Also, look down at the xor example on the alpha blending page

    https://en.wikipedia.org/wiki/Alpha_compositing

> -- 
> cairo mailing list
> [email protected]
> http://lists.cairographics.org/mailman/listinfo/cairo

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.