diff --git a/src/gauge.c b/src/gauge.c index 74d9695..61f3774 100644 --- a/src/gauge.c +++ b/src/gauge.c @@ -24,23 +24,6 @@ void hexagram_gauge_draw_number(hexagram_gauge *gauge, double angle = gauge->min_angle + ((gauge->max_angle - gauge->min_angle) * value) - 1.658; - /* - * Draw the gauge pivot - */ - cairo_set_source_rgb(cr, 1, 1, 1); - - cairo_arc(cr, - gauge->x, - gauge->y, - gauge->radius * 0.08, - 0, - 2.0 * M_PI); - - cairo_stroke(cr); - - /* - * Draw the needle atop the gauge pivot - */ cairo_set_source_rgb(cr, 1, 1, 1); cairo_move_to(cr, @@ -80,6 +63,22 @@ void hexagram_gauge_draw_needle(hexagram_gauge *gauge, double angle = gauge->min_angle + ((gauge->max_angle - gauge->min_angle) * value) - (M_PI / 2.0); + /* + * Draw the gauge pivot + */ + cairo_set_source_rgb(cr, 1, 1, 1); + + cairo_arc(cr, + gauge->x, + gauge->y, + gauge->radius * 0.08, + 0, + 2.0 * M_PI); + + cairo_stroke(cr); + + /* + * Draw the needle above the pivot */ cairo_move_to(cr, gauge->x, gauge->y); cairo_set_source_rgb(cr, 0, 0.25, 1.0);