From 15e3f95712819e13c67f4a5d014e6ece31fb1e75 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;