Nailed it :)
This commit is contained in:
parent
4900d59328
commit
9f919f6575
1 changed files with 4 additions and 1 deletions
|
@ -19,6 +19,8 @@ static void draw_needle(cairo_t *cr,
|
||||||
|
|
||||||
cairo_move_to(cr, x, y);
|
cairo_move_to(cr, x, y);
|
||||||
|
|
||||||
|
cairo_set_source_rgb(cr, 0, 0.25, 1.0);
|
||||||
|
|
||||||
cairo_line_to(cr,
|
cairo_line_to(cr,
|
||||||
x + r * cos((M_PI/180.0) * angle),
|
x + r * cos((M_PI/180.0) * angle),
|
||||||
y + r * sin((M_PI/180.0) * angle));
|
y + r * sin((M_PI/180.0) * angle));
|
||||||
|
@ -43,11 +45,12 @@ static void redraw(cairo_t *ctx) {
|
||||||
/*
|
/*
|
||||||
* Draw a gauge needle
|
* Draw a gauge needle
|
||||||
*/
|
*/
|
||||||
draw_needle(ctx, 208, 240, 176, 240, 480, 0.0);
|
draw_needle(ctx, 208, 240, 176, 232, 502, 0.0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Draw another circle
|
* Draw another circle
|
||||||
*/
|
*/
|
||||||
|
cairo_set_source_rgb(ctx, 1, 1, 1);
|
||||||
cairo_arc(ctx, 816, 240, 192, 0, 360);
|
cairo_arc(ctx, 816, 240, 192, 0, 360);
|
||||||
cairo_stroke(ctx);
|
cairo_stroke(ctx);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue