From f98e0a07075e9f003369e8d4b597d4a6c9a63fb7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 17 Jun 2014 11:34:10 -0400 Subject: [PATCH] use a different approach for indicating expose rects (from robin gareus). #ifdef'd out by default --- libs/canvas/canvas.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc index 07f52b0412..3d4f9e0c5d 100644 --- a/libs/canvas/canvas.cc +++ b/libs/canvas/canvas.cc @@ -110,10 +110,15 @@ Canvas::render (Rect const & area, Cairo::RefPtr 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 }