From 50ff37a17e59b1c390c65cd02bf37257e4441a45 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 10 Jul 2008 09:33:14 +0200 Subject: [PATCH] draw: remove useless draw_circle Signed-off-by: Julien Danjou --- common/draw.c | 31 ------------------------------- common/draw.h | 1 - 2 files changed, 32 deletions(-) diff --git a/common/draw.c b/common/draw.c index 2f5d7546..6fb13b68 100644 --- a/common/draw.c +++ b/common/draw.c @@ -712,37 +712,6 @@ draw_graph_line(draw_context_t *ctx, area_t rect, int *to, int cur_index, cairo_set_line_width(ctx->cr, 1.0); } -/** Draw a circle. - * \param ctx Draw context to draw to. - * \param x X coordinate. - * \param y Y coordinate. - * \param r Size of the circle. - * \param filled Fill circle, or not. - * \param color Color to use. - */ -void -draw_circle(draw_context_t *ctx, int x, int y, int r, bool filled, const xcolor_t *color) -{ - cairo_set_line_width(ctx->cr, 1.0); - cairo_set_source_rgba(ctx->cr, - color->red / 65535.0, - color->green / 65535.0, - color->blue / 65535.0, - color->alpha / 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); - cairo_fill(ctx->cr); - } - else - cairo_arc (ctx->cr, x + r, y + r, r - 1, 0, 2 * M_PI); - - cairo_stroke(ctx->cr); -} - /** Draw an image from ARGB data to a draw context. * Data should be stored as an array of alpha, red, blue, green for each pixel * and the array size should be w * h elements long. diff --git a/common/draw.h b/common/draw.h index 2a14b2b8..be05de81 100644 --- a/common/draw.h +++ b/common/draw.h @@ -209,7 +209,6 @@ void draw_graph(draw_context_t *, area_t, int *, int *, int, position_t, vector_ const xcolor_t *, const xcolor_t *, const xcolor_t *); void draw_graph_line(draw_context_t *, area_t, int *, int, position_t, vector_t, const xcolor_t *, const xcolor_t *, const xcolor_t *); -void draw_circle(draw_context_t *, int, int, int, bool, const xcolor_t *); draw_image_t *draw_image_new(const char *); void draw_image_delete(draw_image_t **); void draw_image(draw_context_t *, int, int, int, draw_image_t *);