Hi again,<br><br>Maybe this mail was overlooked on the list?&nbsp; Can somebody shed some light on this?<br><br>Thanks,<br>Kristof<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Kristof Van Landschoot</b> &lt;<a href="mailto:kristof@coin-c.com">kristof@coin-c.com</a>&gt;<br>
Date: Mon, Apr 28, 2008 at 11:55 AM<br>Subject: Error with clipping when not antialiasing<br>To: <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br><br><br>Hi,<br><br>I&#39;ve isolated what I think must be a bug in cairo with antialiasing.&nbsp; In this snippet of code I set an initial matrix, apply a clipping path, set a new matrix and then draw a rectangle.&nbsp; This rectangle is clipped away entirely, however **only** when antialiasing is set to CAIRO_ANTIALIAS_NONE.&nbsp; If you comment out the line of code setting the antialiasing the rectangle is (correctly) not clipped away.<br>

<br>This is using version 1.6.4 of cairo.<br><br>&nbsp;&nbsp;&nbsp; cairo_surface_t *lSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,3802,2146);<br>&nbsp;&nbsp;&nbsp; unsigned char *lBuffer = cairo_image_surface_get_data(lSurface);<br>&nbsp;&nbsp;&nbsp; memset(lBuffer,255,3802*2146*4);<br>

<br>&nbsp;&nbsp;&nbsp; cairo_t *lStatus = cairo_create(lSurface);<br>&nbsp;&nbsp;&nbsp; cairo_set_antialias(lStatus,CAIRO_ANTIALIAS_NONE);<br><br>&nbsp;&nbsp;&nbsp; cairo_matrix_t lMatrix1;<br>&nbsp;&nbsp;&nbsp; cairo_matrix_init(&amp;lMatrix1,65.0304,0,0,65.0304,-5540,432.90443136);<br>

&nbsp;&nbsp;&nbsp; cairo_transform(lStatus,&amp;lMatrix1);<br><br>&nbsp;&nbsp;&nbsp; cairo_new_path(lStatus);<br>&nbsp;&nbsp;&nbsp; cairo_rectangle(lStatus,85.1911,0.00168997,730.813,922.432);<br>&nbsp;&nbsp;&nbsp; cairo_clip(lStatus);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; cairo_matrix_t lMatrix9;<br>&nbsp;&nbsp;&nbsp; cairo_matrix_init(&amp;lMatrix9,0.268657,0,0,0.268657,105.604903,0.985497);<br>

&nbsp;&nbsp;&nbsp; cairo_transform(lStatus,&amp;lMatrix9);<br><br>&nbsp;&nbsp;&nbsp; cairo_rectangle(lStatus,-0.23,0.5,103.67,65.3);<br>&nbsp;&nbsp;&nbsp; cairo_set_source_rgba(lStatus,0,0,1,1);<br>&nbsp;&nbsp;&nbsp; cairo_fill_preserve(lStatus);<br>&nbsp;&nbsp;&nbsp; cairo_surface_flush(lSurface);<br>

<br>Thanks,<br>Best regards,<br><font color="#888888">Kristof<br><br>
</font></div><br>