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">&lt;<a href="mailto:otte@redhat.com">otte@redhat.com</a>&gt;</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&#39;s<br>
what you want) is INVERT.<br>
<br>
To get the effect of INVERT, you&#39;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>
&gt; Hi<br>
&gt;<br>
&gt; I am a newbie to cairo. I saw in some of the discussion that cairo<br>
&gt; does not support bitwise XOR drawing (like drawing same shape on same<br>
&gt; area will make it disappear)<br>
&gt; Can anyone please suggest as to how can I perform XOR drawing of<br>
&gt; draw/fill shape ex fillrect with cairo APIs?<br>
&gt;<br>
&gt; I have some legacy programs that need to use XOR based drawing like<br>
&gt; blinking of cursor under a line<br>
&gt; Thx in advance<br>
&gt;<br>
</div></div>&gt; --<br>
&gt; cairo mailing list<br>
&gt; <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
&gt; <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>