Fix clipping for scroll groups an offset bbox.
authorDavid Robillard <d@drobilla.net>
Fri, 16 Jan 2015 23:26:54 +0000 (18:26 -0500)
committerDavid Robillard <d@drobilla.net>
Sat, 17 Jan 2015 00:13:56 +0000 (19:13 -0500)
libs/canvas/scroll_group.cc

index df51df9ebb0d0b62fa2d224b4f3080d5df7e33cc..1562643b4a936a031196d090b65a8146c6601967 100644 (file)
@@ -52,7 +52,10 @@ ScrollGroup::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) c
                return;
        }
 
-       Rect self (_position.x, _position.y, _position.x + r.get().width(), _position.y + r.get().height());
+       Rect self (_position.x + r.get().x0,
+                  _position.y + r.get().y0,
+                  _position.x + r.get().x1,
+                  _position.y + r.get().y1);
 
        self.x1 = min (_position.x + _canvas->width(), self.x1);
        self.y1 = min (_position.y + _canvas->height(), self.y1);