mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
Canvas: fix text rendering geometry
This commit is contained in:
parent
d647ff64b9
commit
19a85d6157
1 changed files with 5 additions and 5 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include <gtkmm/window.h>
|
||||
#include <gtkmm/label.h>
|
||||
|
||||
#include "pbd/compose.h"
|
||||
#include "pbd/stacktrace.h"
|
||||
|
||||
#include "canvas/text.h"
|
||||
|
|
@ -194,10 +195,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;
|
||||
}
|
||||
|
||||
|
|
@ -205,8 +207,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…
Add table
Add a link
Reference in a new issue