use a different approach for indicating expose rects (from robin gareus). #ifdef...
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 17 Jun 2014 15:34:10 +0000 (11:34 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 17 Jun 2014 15:34:54 +0000 (11:34 -0400)
libs/canvas/canvas.cc

index 07f52b0412dbae57e6de7a06d297dc9036620a05..3d4f9e0c5df633d0eb71f609ef01fe336c17643c 100644 (file)
@@ -110,10 +110,15 @@ Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context
 
                _root.render (*draw, context);
 
-               // This outlines the rect being rendered, after it has been drawn.
-               // context->rectangle (draw->x0, draw->y0, draw->x1 - draw->x0, draw->y1 - draw->y0);
-               // context->set_source_rgba (1.0, 0, 0, 1.0);
-               // context->stroke ();
+#if 0
+               // This transparently colors the rect being rendered, after it has been drawn.
+               double r = (random() % 65536) /65536.0;
+               double g = (random() % 65536) /65536.0;
+               double b = (random() % 65536) /65536.0;
+               context->rectangle (draw->x0, draw->y0, draw->x1 - draw->x0, draw->y1 - draw->y0);
+               context->set_source_rgba (r, g, b, 0.25);
+               context->fill ();
+#endif
 
        }