From e0eb5d33c213ad8e36dcd667ed9c06d32ffc9544 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 19 May 2019 21:22:21 +0200 Subject: Fix alignment of ruler ticks --- src/display/sp-canvas.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/display/sp-canvas.cpp') diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index e8a36a3a7..bb8848a18 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -2814,8 +2814,7 @@ Geom::Rect SPCanvas::getViewbox() const GtkAllocation allocation; gtk_widget_get_allocation (GTK_WIDGET (this), &allocation); - return Geom::Rect(Geom::Point(_dx0, _dy0), - Geom::Point(_dx0 + allocation.width, _dy0 + allocation.height)); + return Geom::Rect::from_xywh(_dx0, _dy0, allocation.width, allocation.height); } /** @@ -2826,10 +2825,7 @@ Geom::IntRect SPCanvas::getViewboxIntegers() const GtkAllocation allocation; gtk_widget_get_allocation (GTK_WIDGET(this), &allocation); - Geom::IntRect ret; - ret.setMin(Geom::IntPoint(_x0, _y0)); - ret.setMax(Geom::IntPoint(_x0 + allocation.width, _y0 + allocation.height)); - return ret; + return Geom::IntRect::from_xywh(_x0, _y0, allocation.width, allocation.height); } inline int sp_canvas_tile_floor(int x) -- cgit v1.2.3