Thanks Benjamin for your input<br>I actually would be working on cairo 1.8 so probably this will not help<br><br>Can anyone suggest if we can do something like this?<br><br>rgb = cairo_get_pixel(x,y) where x,y is the coordinate on screen<br>
cairo_set_pixel(x,y, rgb ^ xorcolor)<br><br>or something similar<br><br>Thx in advance<br><br><div class="gmail_quote">On Wed, Aug 25, 2010 at 6:12 PM, Benjamin Otte <span dir="ltr"><<a href="mailto:otte@redhat.com">otte@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">You cannot do XOR with Cairo. What you can get (and I suspect that's<br>
what you want) is INVERT.<br>
<br>
To get the effect of INVERT, you'd do:<br>
cairo_set_operator (cr, CAIRO_OPERATOR_DIFFERENCE);<br>
cairo_set_source_rgb (cr, 1, 1, 1);<br>
<br>
Note that this requires Cairo 1.9 snapshots.<br>
<br>
Benjamin<br>
<div><div></div><div class="h5"><br>
<br>
On Wed, 2010-08-25 at 17:02 +0530, Prasanta Sadhukhan wrote:<br>
> Hi<br>
><br>
> I am a newbie to cairo. I saw in some of the discussion that cairo<br>
> does not support bitwise XOR drawing (like drawing same shape on same<br>
> area will make it disappear)<br>
> Can anyone please suggest as to how can I perform XOR drawing of<br>
> draw/fill shape ex fillrect with cairo APIs?<br>
><br>
> I have some legacy programs that need to use XOR based drawing like<br>
> blinking of cursor under a line<br>
> Thx in advance<br>
><br>
</div></div>> --<br>
> cairo mailing list<br>
> <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
> <a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
<br>
<br>
</blockquote></div><br>