fix for cairo_arc

Without a new (sub)path, it joined the new circle to the old reference point,
what happend to be at the end of the title-text - therefore the line to it with
cairo_stroke()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
marco candrian 2008-01-31 21:49:05 +01:00 committed by Julien Danjou
parent be0779d0fa
commit 8d3c24e03e
1 changed files with 3 additions and 0 deletions

View File

@ -230,6 +230,9 @@ draw_circle(DrawCtx *ctx, int x, int y, int r, Bool filled, XColor color)
{
cairo_set_line_width(ctx->cr, 1.0);
cairo_set_source_rgb(ctx->cr, color.red / 65535.0, color.green / 65535.0, color.blue / 65535.0);
cairo_new_sub_path(ctx->cr); /* don't draw from the old reference point to.. */
if(filled)
{
cairo_arc (ctx->cr, x + r, y + r, r, 0, 2 * M_PI);