And bring us back a couple of Europa-pean lobsters to grill up!
This commit is contained in:
		
							parent
							
								
									8e3b8a9bcb
								
							
						
					
					
						commit
						bf8c9038a8
					
				
					 1 changed files with 26 additions and 23 deletions
				
			
		|  | @ -50,35 +50,13 @@ static void draw_face_number(cairo_t *cr, | ||||||
|     cairo_restore(cr); |     cairo_restore(cr); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void redraw(cairo_t *cr) { | static void draw_tachometer(cairo_t *cr) { | ||||||
|     int i; |     int i; | ||||||
| 
 | 
 | ||||||
|     /*
 |  | ||||||
|      * Set up text |  | ||||||
|      */ |  | ||||||
|     cairo_select_font_face(cr, "Helvetica", |  | ||||||
|       CAIRO_FONT_SLANT_NORMAL, |  | ||||||
|       CAIRO_FONT_WEIGHT_NORMAL); |  | ||||||
| 
 |  | ||||||
|     cairo_set_font_size(cr, 24); |  | ||||||
| 
 |  | ||||||
|     /*
 |  | ||||||
|      * Paint canvas black |  | ||||||
|      */ |  | ||||||
|     cairo_set_source_rgb(cr, 0, 0, 0); |  | ||||||
|     cairo_paint(cr); |  | ||||||
| 
 |  | ||||||
|     /*
 |  | ||||||
|      * Draw two identical circles |  | ||||||
|      */ |  | ||||||
|     cairo_set_source_rgb(cr, 1, 1, 1); |     cairo_set_source_rgb(cr, 1, 1, 1); | ||||||
|     cairo_arc(cr, 208, 240, 192, 0, 360); |     cairo_arc(cr, 208, 240, 192, 0, 360); | ||||||
|     cairo_stroke(cr); |     cairo_stroke(cr); | ||||||
| 
 | 
 | ||||||
|     cairo_arc(cr, 816, 240, 192, 0, 360); |  | ||||||
|     cairo_stroke(cr); |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     /*
 |     /*
 | ||||||
|      * Draw face numbers |      * Draw face numbers | ||||||
|      */ |      */ | ||||||
|  | @ -100,6 +78,31 @@ static void redraw(cairo_t *cr) { | ||||||
|     cairo_set_source_rgb(cr, 1, 1, 1); |     cairo_set_source_rgb(cr, 1, 1, 1); | ||||||
|     cairo_arc(cr, 208, 240, 16, 0, 360); |     cairo_arc(cr, 208, 240, 16, 0, 360); | ||||||
|     cairo_fill(cr); |     cairo_fill(cr); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | static void draw_speedometer(cairo_t *cr) { | ||||||
|  |     cairo_arc(cr, 816, 240, 192, 0, 360); | ||||||
|  |     cairo_stroke(cr); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | static void redraw(cairo_t *cr) { | ||||||
|  |     /*
 | ||||||
|  |      * Set up text | ||||||
|  |      */ | ||||||
|  |     cairo_select_font_face(cr, "Helvetica", | ||||||
|  |       CAIRO_FONT_SLANT_NORMAL, | ||||||
|  |       CAIRO_FONT_WEIGHT_NORMAL); | ||||||
|  | 
 | ||||||
|  |     cairo_set_font_size(cr, 24); | ||||||
|  | 
 | ||||||
|  |     /*
 | ||||||
|  |      * Paint canvas black | ||||||
|  |      */ | ||||||
|  |     cairo_set_source_rgb(cr, 0, 0, 0); | ||||||
|  |     cairo_paint(cr); | ||||||
|  | 
 | ||||||
|  |     draw_tachometer(cr); | ||||||
|  |     draw_speedometer(cr); | ||||||
| 
 | 
 | ||||||
|     /*
 |     /*
 | ||||||
|      * Draw two smaller circles |      * Draw two smaller circles | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue