Canvas: fix text rendering geometry
This commit is contained in:
parent
7153544b52
commit
04d00da461
@ -192,10 +192,11 @@ Text::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||
return;
|
||||
}
|
||||
|
||||
Rect self = item_to_window (Rect (_position.x, _position.y, _position.x + min (_clamped_width, (double)_image->get_width ()), _position.y + _image->get_height ()));
|
||||
Rect i = self.intersection (area);
|
||||
const Rect r (0, 0, min (_clamped_width, (double)_image->get_width ()), _image->get_height ());
|
||||
Rect self = item_to_window (r);
|
||||
Rect intersection = self.intersection (area);
|
||||
|
||||
if (!i) {
|
||||
if (!intersection) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -203,8 +204,6 @@ Text::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||
_redraw ();
|
||||
}
|
||||
|
||||
Rect intersection (i);
|
||||
|
||||
context->rectangle (intersection.x0, intersection.y0, intersection.width(), intersection.height());
|
||||
#ifdef __APPLE__
|
||||
/* Below, the rendering scaling is set to support retina display
|
||||
|
Loading…
Reference in New Issue
Block a user