<div dir="ltr"><span style="font-size:12.8px">> Code:</span><br style="font-size:12.8px"><span style="font-size:12.8px">> </span><a href="http://pasted.co/634b16c6" rel="noreferrer" target="_blank" style="font-size:12.8px">http://pasted.co/634b16c6</a><div>In the code, if I comment the code (background) the effect work fine but without background. I don't understand why if I paint a black background and destroy the cairo_t (background) the background affect to the second cairo_t (effect). </div><div>I try with cairo_save/cairo_restore:</div><div><br></div><div><div>//Background</div><div> cr = cairo_create (surface);</div><div> cairo_save (cr);</div><div><span class="" style="white-space:pre"> </span>cairo_set_source_rgba (cr, 0, 0, 0, 1);</div><div><span class="" style="white-space:pre"> </span>cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);</div><div><span class="" style="white-space:pre"> </span>cairo_paint (cr);</div><div><span class="" style="white-space:pre"> </span>cairo_restore (cr);</div><div><span class="" style="white-space:pre"> </span>cairo_destroy (cr);</div></div><div><br></div><div>but don't work.</div><div>Is there any way to avoid this ?</div><div><br></div><div>Regards!!</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-17 1:25 GMT+01:00 Lawrence D'Oliveiro <span dir="ltr"><<a href="mailto:ldo@geek-central.gen.nz" target="_blank">ldo@geek-central.gen.nz</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, 16 Jan 2016 23:55:52 +0100, Alex Vazquez wrote:<br>
<br>
> Code:<br>
> <a href="http://pasted.co/634b16c6" rel="noreferrer" target="_blank">http://pasted.co/634b16c6</a><br>
<br>
This does not seem to be using alpha transparency anywhere.<br>
<br>
But going back to the original example<br>
<<a href="http://postimg.org/image/ieohdu29t/" rel="noreferrer" target="_blank">http://postimg.org/image/ieohdu29t/</a>>, I think I previously<br>
misunderstood what was going on. Each disc is opaque outside the<br>
intersecting area. The intersecting part has a mix of the two colours.<br>
<br>
So really, draw each circle with an opaque colour clipped outside the<br>
other circle. Then fill the mixed colour, clipped to the intersection<br>
of the two circles.<br>
<div class="HOEnZb"><div class="h5">--<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" rel="noreferrer" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a></div></div></blockquote></div><br></div>