13
0

canvas: if LineSet does the 0.5 pixel shift, make it the right direction

This commit is contained in:
Paul Davis 2023-09-25 20:01:21 -06:00
parent 5fa5c5d202
commit 0a6ac2678a

View File

@ -106,12 +106,12 @@ LineSet::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
if (_orientation == Horizontal) {
self = Rect (0, l.pos - (l.width/2.0), _extent, l.pos + (l.width/2.0));
if (fmod (l.width, 2.)) {
self.y0 -= shift;
self.y0 += shift;
}
} else {
self = Rect (l.pos - (l.width/2.0), 0, l.pos + (l.width/2.0), _extent);
if (fmod (l.width, 2.)) {
self.x0 -= shift;
self.x0 += shift;
}
}