From 158037bba2a14f5782b7916040736c27f0112b52 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 1 Sep 2014 18:05:09 +0200 Subject: [PATCH] Match canvas outline to rectangle It looks like we're currently [consistently] off by 1px everywhere. The width-1 is compensated by TimeAxisViewItem::RIGHT_EDGE_SHIFT = 1 --- libs/canvas/rectangle.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/canvas/rectangle.cc b/libs/canvas/rectangle.cc index bc4ad0c960..1b75584849 100644 --- a/libs/canvas/rectangle.cc +++ b/libs/canvas/rectangle.cc @@ -118,8 +118,8 @@ Rectangle::render (Rect const & area, Cairo::RefPtr context) con if (_outline_what & RIGHT) { /* vertical line: move x-coordinate by 0.5 pixels */ - context->move_to (self.x1 + 0.5, self.y0); - context->line_to (self.x1 + 0.5, self.y1); + context->move_to (self.x1 - 0.5, self.y0); + context->line_to (self.x1 - 0.5, self.y1); } }