From 2242b3706c94d4653e0be80b328ad9a49c73d6cb Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 15 Sep 2023 16:46:40 -0600 Subject: [PATCH] another pixel width fix, to accomodate for the unliekly If the line width is odd, not just 1.0, the 0.5 pixel shift is required --- libs/canvas/ruler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/canvas/ruler.cc b/libs/canvas/ruler.cc index 51154c17c0..f760021f9d 100644 --- a/libs/canvas/ruler.cc +++ b/libs/canvas/ruler.cc @@ -197,8 +197,8 @@ Ruler::render (Rect const & area, Cairo::RefPtr cr) const prev = pos.x; } - if (_outline_width == 1.0) { - /* Cairo single pixel line correction */ + if (fmod (_outline_width, 2.)) { + /* Cairo odd pixel width line correction */ cr->move_to (pos.x + 0.5, pos.y); } else { cr->move_to (pos.x, pos.y);