mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
basically operational switch to canvas drawing coordinates, although text and waves don't work, and redraw areas are too small
This commit is contained in:
parent
a0c5de281a
commit
77f5f4c4bf
14 changed files with 160 additions and 149 deletions
|
|
@ -96,6 +96,8 @@ Text::redraw (Cairo::RefPtr<Cairo::Context> context) const
|
|||
* ::render
|
||||
*/
|
||||
|
||||
cerr << "rendered \"" << layout->get_text() << "\" into image\n";
|
||||
|
||||
_need_redraw = false;
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +138,7 @@ Text::compute_bounding_box () const
|
|||
}
|
||||
|
||||
void
|
||||
Text::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) const
|
||||
Text::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||
{
|
||||
if (_text.empty()) {
|
||||
return;
|
||||
|
|
@ -146,8 +148,12 @@ Text::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) cons
|
|||
redraw (context);
|
||||
}
|
||||
|
||||
|
||||
Rect self = item_to_window (Rect (0, 0, min (_clamped_width, _width), _height));
|
||||
cerr << "Draw \"" << _text << "\" @ " << self.x0 << ", " << self.y0 << ' ' << self.width() << " x " << self.height() << endl;
|
||||
context->rectangle (self.x0, self.y0, self.width(), self.height());
|
||||
context->set_source (_image, 0, 0);
|
||||
context->rectangle (0, 0, min (_clamped_width, _width), _height);
|
||||
//context->set_source_rgb (0.3, 0.4, 0.02);
|
||||
context->fill ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue