<font color='black' size='2' face='arial'>
<div> <font size="2"><br>
If I take a look at the pixels, I can see the arc not making a half circle in this case. When I run the following program I get this output. This is with cairo 1.14.6. If I try the same program with Valgrind the half circle lines up?<br>
<br>
Eric<br>
<br>
...<br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
255 255 255 0 0 0 0 0 0 0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 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 <br>
...<br>
<br>
#include <cairo.h><br>
#include <stdio.h><br>
#include <math.h><br>
<br>
int main()<br>
{<br>
//cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_RGB16_565, 30, 20);<br>
cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 30, 20);<br>
cairo_t *cr = cairo_create (surface);<br>
cairo_set_line_width (cr, 2);<br>
cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);<br>
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);<br>
cairo_paint(cr);<br>
<br>
cairo_set_source_rgb (cr, 0.0, 1.0, 0.0);<br>
cairo_arc (cr, 15, 0.501954078674316, 5, 0, M_PI);<br>
cairo_stroke (cr);<br>
cairo_destroy (cr);<br>
<br>
int i=0;<br>
int j=0;<br>
cairo_surface_flush(surface);<br>
int width = cairo_image_surface_get_width(surface);<br>
int height = cairo_image_surface_get_height(surface);<br>
int stride = cairo_format_stride_for_width (CAIRO_FORMAT_ARGB32, 30);<br>
int channels = 4;<br>
unsigned char *s=cairo_image_surface_get_data(surface);<br>
unsigned char *pixels=s;<br>
for(i=0;i<width;i++)<br>
{<br>
for(j=0;j<height;j++)<br>
{<br>
printf("%3i ", pixels[j*stride+i*channels+1]);<br>
}<br>
printf("\n");<br>
}<br>
<br>
cairo_surface_destroy (surface);<br>
return 0;<br>
}</font><br>
</div>
<div> <br>
</div>
<br>
</font>