From 845600b2614aa107a2f85698fe612af586fa1473 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 26 Aug 2023 10:07:03 -0600 Subject: [PATCH] fix off-by-one pixel error caused by using floor() instead of round() --- libs/canvas/ruler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/canvas/ruler.cc b/libs/canvas/ruler.cc index 67c10fe690..4d3aa72268 100644 --- a/libs/canvas/ruler.cc +++ b/libs/canvas/ruler.cc @@ -167,7 +167,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr cr) const Duple pos; Pango::FontDescription* fd = (m->style == Mark::Major) ? (_second_font_description ? _second_font_description : _font_description) : _font_description; - pos.x = floor ((m->position - _lower) / _metric->units_per_pixel); + pos.x = round ((m->position - _lower) / _metric->units_per_pixel); pos.y = self.y1; /* bottom edge */ if (fd != last_font_description) {