mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
correct translation matrix for Canvas::Widget
This commit is contained in:
parent
f6061b32b2
commit
73acd5b413
1 changed files with 5 additions and 5 deletions
|
|
@ -75,7 +75,7 @@ Widget::queue_resize ()
|
||||||
void
|
void
|
||||||
Widget::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
Widget::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||||
{
|
{
|
||||||
// std::cerr << "Render widget\n";
|
//std::cerr << "Render widget " << name << " @ " << position() << endl;
|
||||||
|
|
||||||
if (!_bounding_box) {
|
if (!_bounding_box) {
|
||||||
std::cerr << "no bbox\n";
|
std::cerr << "no bbox\n";
|
||||||
|
|
@ -97,11 +97,12 @@ Widget::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||||
crect.height = draw.height();
|
crect.height = draw.height();
|
||||||
crect.width = draw.width();
|
crect.width = draw.width();
|
||||||
|
|
||||||
// std::cerr << "will draw " << draw << "\n";
|
Duple p = position_offset();
|
||||||
|
|
||||||
context->save ();
|
context->save ();
|
||||||
context->translate (-draw.x0, -draw.y0);
|
context->translate (p.x, p.y);
|
||||||
//context->rectangle (draw.x0, draw.y0, draw.width(), draw.height());
|
//context->rectangle (draw.x0, draw.y0, draw.width(), draw.height());
|
||||||
// context->clip ();
|
//context->clip ();
|
||||||
|
|
||||||
_widget.render (context->cobj(), &crect);
|
_widget.render (context->cobj(), &crect);
|
||||||
|
|
||||||
|
|
@ -132,4 +133,3 @@ Widget::compute_bounding_box () const
|
||||||
|
|
||||||
_bounding_box_dirty = false;
|
_bounding_box_dirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue