13
0

fix off-by-one pixel error caused by using floor() instead of round()

This commit is contained in:
Paul Davis 2023-08-26 10:07:03 -06:00
parent 1f772d30d3
commit 845600b261

View File

@ -167,7 +167,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
Duple pos; Duple pos;
Pango::FontDescription* fd = (m->style == Mark::Major) ? (_second_font_description ? _second_font_description : _font_description) : _font_description; 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 */ pos.y = self.y1; /* bottom edge */
if (fd != last_font_description) { if (fd != last_font_description) {