Duple item_to_window (Duple const&, bool rounded = true) const;
Duple window_to_item (Duple const&) const;
- Rect item_to_window (Rect const&) const;
+ Rect item_to_window (Rect const&, bool rounded = true) const;
Rect window_to_item (Rect const&) const;
void raise_to_top ();
}
ArdourCanvas::Rect
-Item::item_to_window (ArdourCanvas::Rect const & r) const
+Item::item_to_window (ArdourCanvas::Rect const & r, bool rounded) const
{
Rect ret = item_to_canvas (r).translate (-scroll_offset());
- ret.x0 = round (ret.x0);
- ret.x1 = round (ret.x1);
- ret.y0 = round (ret.y0);
- ret.y1 = round (ret.y1);
+ if (rounded) {
+ ret.x0 = round (ret.x0);
+ ret.x1 = round (ret.x1);
+ ret.y0 = round (ret.y0);
+ ret.y1 = round (ret.y1);
+ }
return ret;
}
continue;
}
- Rect item = (*i)->item_to_window (item_bbox.get());
+ Rect item = (*i)->item_to_window (item_bbox.get(), false);
boost::optional<Rect> d = item.intersection (area);
if (d) {