From 69d63bac92b70a41905057cf7b23e66374a31148 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 29 May 2024 14:13:47 -0600 Subject: [PATCH] do not plot ruler marks that are left of the current (scroll-adjusted) canvas edge --- libs/canvas/ruler.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/canvas/ruler.cc b/libs/canvas/ruler.cc index f760021f9d..68ebb2aa94 100644 --- a/libs/canvas/ruler.cc +++ b/libs/canvas/ruler.cc @@ -170,6 +170,10 @@ Ruler::render (Rect const & area, Cairo::RefPtr cr) const pos.x = round (m->position/_metric->units_per_pixel) + self.x0; pos.y = self.y1; /* bottom edge */ + if (pos.x < 0) { + continue; + } + if (fd != last_font_description) { layout->set_font_description (*fd); last_font_description = fd;