add a stripe-pattern to the meters
authorRobin Gareus <robin@gareus.org>
Wed, 17 Jul 2013 20:45:08 +0000 (22:45 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 17 Jul 2013 20:45:08 +0000 (22:45 +0200)
libs/gtkmm2ext/fastmeter.cc

index 6ea1a6dd4b42f43a5bbe2baaba486ae3f10ee17a..817b11ff6c9445e4db45c8324e15a8f6d3b7d0d9 100644 (file)
@@ -189,6 +189,18 @@ FastMeter::generate_meter_pattern (
                cairo_set_source (tc, pat);
                cairo_rectangle (tc, 0, 0, width, height);
                cairo_fill (tc);
+
+               cairo_save (tc);
+               cairo_set_line_width(tc, 1.0);
+               cairo_set_source_rgba(tc, .1, .1, .1, .5);
+               //cairo_set_operator (tc, CAIRO_OPERATOR_SOURCE);
+               for (float y=.5; y < height; y+= 2.0) {
+                       cairo_move_to(tc, 0, y);
+                       cairo_line_to(tc, width, y);
+                       cairo_stroke (tc);
+               }
+               cairo_restore (tc);
+
                cairo_set_source (tc, shade_pattern);
                cairo_rectangle (tc, 0, 0, width, height);
                cairo_fill (tc);