X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fcanvas%2Fitem.cc;h=ab8764a97a9677ad5ac138d4d85c27e054b83bb3;hb=573ec69a9aa29b08d99cba56284660fcd080fb55;hp=9a851891d950a9f0605e260704a1972e34c93eff;hpb=86242348ec9890a356892a6c89694b75c5251a6a;p=ardour.git diff --git a/libs/canvas/item.cc b/libs/canvas/item.cc index 9a851891d9..ab8764a97a 100644 --- a/libs/canvas/item.cc +++ b/libs/canvas/item.cc @@ -231,14 +231,16 @@ Item::window_to_item (ArdourCanvas::Duple const & d) const } 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; } @@ -766,7 +768,7 @@ Item::render_children (Rect const & area, Cairo::RefPtr context) continue; } - Rect item = (*i)->item_to_window (item_bbox.get()); + Rect item = (*i)->item_to_window (item_bbox.get(), false); boost::optional d = item.intersection (area); if (d) {