From e7f8147394934a44e44539329f51e73a2af1b93f Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 18 May 2019 22:53:47 +0200 Subject: Fix pixel alignment of box selection cue --- src/display/sodipodi-ctrlrect.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/display/sodipodi-ctrlrect.cpp b/src/display/sodipodi-ctrlrect.cpp index 683b2fb15..2900310c5 100644 --- a/src/display/sodipodi-ctrlrect.cpp +++ b/src/display/sodipodi-ctrlrect.cpp @@ -172,16 +172,11 @@ void CtrlRect::render(SPCanvasBuf *buf) // Snap to pixel grid Geom::Rect outline( _rect.min() * _affine, _rect.max() * _affine); - // Check if there is a simpler way to go from 'outline' to 'int_rect'. - Geom::IntRect int_rect ( (int) floor(outline.min()[X] + 0.5), - (int) floor(outline.min()[Y] + 0.5), - (int) floor(outline.max()[X] + 0.5), - (int) floor(outline.max()[Y] + 0.5) ); cairo_rectangle (buf->ct, - 0.5 + int_rect[X].min(), - 0.5 + int_rect[Y].min(), - int_rect[X].max() - int_rect[X].min(), - int_rect[Y].max() - int_rect[Y].min() ); + floor(outline.min()[X])+0.5, + floor(outline.min()[Y])+0.5, + floor(outline.max()[X]) - floor(outline.min()[X]), + floor(outline.max()[Y]) - floor(outline.min()[Y])); } else { // Angled -- cgit v1.2.3