From 91de7ba60b0d71c83e008d4d7a2594396b91f86c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 21 Oct 2018 22:14:44 -0400 Subject: [PATCH] do not double-translate Canvas::Rectangle by _position; item_to_window() already includes it by calling item_to_canvas() --- libs/canvas/rectangle.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/canvas/rectangle.cc b/libs/canvas/rectangle.cc index 7f12052c4e..370db759b6 100644 --- a/libs/canvas/rectangle.cc +++ b/libs/canvas/rectangle.cc @@ -58,10 +58,8 @@ Rectangle::Rectangle (Item* parent, Rect const & rect) void Rectangle::render (Rect const & area, Cairo::RefPtr context) const { - /* In general, a Rectangle will have a _position of (0,0) within its - parent, and its extent is actually defined by _rect. But in the - unusual case that _position is set to something other than (0,0), - we should take that into account when rendering. + /* Note that item_to_window() already takes _position into account (as + part of item_to_canvas() */ Rect self (item_to_window (_rect, false));