Fix some warm and bad comments, code

This commit is contained in:
XANTRONIX Development 2019-06-09 16:10:31 -05:00
parent 7cd217bef4
commit f5624bfd4e

View file

@ -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);