2005-07-22 06:20:53 +00:00
|
|
|
#include "cairo-tutorial.h"
|
|
|
|
|
|
|
|
|
|
static void
|
2006-01-25 02:10:23 +00:00
|
|
|
draw (cairo_t *cr, int width, int height)
|
2005-07-22 06:20:53 +00:00
|
|
|
{
|
2006-01-25 10:22:32 +00:00
|
|
|
int radius;
|
2005-07-22 06:20:53 +00:00
|
|
|
|
2006-01-25 10:22:32 +00:00
|
|
|
if (width < height)
|
|
|
|
|
radius = width/2 - 4;
|
|
|
|
|
else
|
|
|
|
|
radius = height/2 - 4;
|
|
|
|
|
|
|
|
|
|
cairo_move_to (cr, width/2 + radius, height/2);
|
|
|
|
|
cairo_arc (cr, width/2, height/2, radius,
|
2005-07-22 06:20:53 +00:00
|
|
|
0.0, 2 * M_PI);
|
|
|
|
|
|
|
|
|
|
cairo_set_source_rgb (cr, 0.6, 0.8, 1.0);
|
|
|
|
|
cairo_fill_preserve (cr);
|
|
|
|
|
|
|
|
|
|
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
|
|
|
|
|
cairo_stroke (cr);
|
|
|
|
|
}
|