From c358e77e1e81a68fcb8b18cd71a31c38262b2af7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 2 May 2013 18:21:35 -0400 Subject: [PATCH] move setup_outline_context() to a more sensible shared location --- libs/canvas/rectangle.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/canvas/rectangle.cc b/libs/canvas/rectangle.cc index 38106a6550..bb1198c1bb 100644 --- a/libs/canvas/rectangle.cc +++ b/libs/canvas/rectangle.cc @@ -67,6 +67,7 @@ Rectangle::render (Rect const & /*area*/, Cairo::RefPtr context) if (_fill) { setup_fill_context (context); + cerr << "Fill rect: " << plot << endl; context->rectangle (plot.x0, plot.y0, plot.width(), plot.height()); if (!_outline) { @@ -90,13 +91,16 @@ Rectangle::render (Rect const & /*area*/, Cairo::RefPtr context) if (_outline) { + setup_outline_context (context); + if (_outline_what == What (LEFT|RIGHT|BOTTOM|TOP)) { - /* if we filled and use full outline, we are already done */ + /* if we filled and use full outline, we are already + * done. otherwise, draw the frame here. + */ if (!_fill) { context->rectangle (plot.x0, plot.y0, plot.width(), plot.height()); - setup_outline_context (context); context->stroke (); } @@ -122,7 +126,6 @@ Rectangle::render (Rect const & /*area*/, Cairo::RefPtr context) context->line_to (plot.x1, plot.y0); } - setup_outline_context (context); context->stroke (); } }