1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| {
cairo_t *cr;
gint x, y;
gint w, h;
x = da->allocation.x;
y = da->allocation.y;
w = da->allocation.width;
h = da->allocation.height;
//The first Circle:
cr = gdk_cairo_create(da->window);
cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
cairo_set_line_width (cr, 1);
cairo_arc(cr,50,50,40,0,360* (3.1415 / 180.));
cairo_stroke(cr);
cairo_destroy(cr);
cr = gdk_cairo_create(da->window);
cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
cairo_set_line_width (cr, 1);
cairo_arc(cr,50,50,39,0,360* (3.1415 / 180.));
cairo_stroke(cr);
cairo_destroy(cr);
//The second filled circle:
cr = gdk_cairo_create(da->window);
cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
cairo_set_line_width (cr, 1);
cairo_arc(cr,150,50,40,0,360* (3.1415 / 180.));
cairo_stroke(cr);
cairo_destroy(cr);
cr = gdk_cairo_create(da->window);
cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
cairo_set_line_width (cr, 1);
cairo_arc(cr,150,50,39,0,360* (3.1415 / 180.));
cairo_fill (cr);
cairo_stroke(cr);
cairo_destroy(cr);
return TRUE;
}
|