diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2019-05-19 19:22:21 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mail@diedenrezi.nl> | 2019-05-20 16:22:27 +0000 |
| commit | e0eb5d33c213ad8e36dcd667ed9c06d32ffc9544 (patch) | |
| tree | a855b07be15b415e5df4e03fb2116288d945df9c /src/display/sp-canvas.cpp | |
| parent | Fix pixel alignment of box selection cue (diff) | |
| download | inkscape-e0eb5d33c213ad8e36dcd667ed9c06d32ffc9544.tar.gz inkscape-e0eb5d33c213ad8e36dcd667ed9c06d32ffc9544.zip | |
Fix alignment of ruler ticks
Diffstat (limited to 'src/display/sp-canvas.cpp')
| -rw-r--r-- | src/display/sp-canvas.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
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) |
