Hi again,<br><br>Maybe this mail was overlooked on the list? 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> <<a href="mailto:kristof@coin-c.com">kristof@coin-c.com</a>><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've isolated what I think must be a bug in cairo with antialiasing. In this snippet of code I set an initial matrix, apply a clipping path, set a new matrix and then draw a rectangle. This rectangle is clipped away entirely, however **only** when antialiasing is set to CAIRO_ANTIALIAS_NONE. 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> cairo_surface_t *lSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,3802,2146);<br> unsigned char *lBuffer = cairo_image_surface_get_data(lSurface);<br> memset(lBuffer,255,3802*2146*4);<br>
<br> cairo_t *lStatus = cairo_create(lSurface);<br> cairo_set_antialias(lStatus,CAIRO_ANTIALIAS_NONE);<br><br> cairo_matrix_t lMatrix1;<br> cairo_matrix_init(&lMatrix1,65.0304,0,0,65.0304,-5540,432.90443136);<br>
cairo_transform(lStatus,&lMatrix1);<br><br> cairo_new_path(lStatus);<br> cairo_rectangle(lStatus,85.1911,0.00168997,730.813,922.432);<br> cairo_clip(lStatus);<br> <br> cairo_matrix_t lMatrix9;<br> cairo_matrix_init(&lMatrix9,0.268657,0,0,0.268657,105.604903,0.985497);<br>
cairo_transform(lStatus,&lMatrix9);<br><br> cairo_rectangle(lStatus,-0.23,0.5,103.67,65.3);<br> cairo_set_source_rgba(lStatus,0,0,1,1);<br> cairo_fill_preserve(lStatus);<br> cairo_surface_flush(lSurface);<br>
<br>Thanks,<br>Best regards,<br><font color="#888888">Kristof<br><br>
</font></div><br>