probe buffersize if jackd is already running.
[ardour.git] / libs / canvas / line.cc
index 8f04e2b27878699345feb26f2896e27095fe0aa4..8bd26b90678dfc49626169acbb7cab5b3fa44ea7 100644 (file)
 using namespace std;
 using namespace ArdourCanvas;
 
-Line::Line (Group* parent)
-       : Item (parent)
-       , Outline (parent)
+Line::Line (Canvas* c)
+       : Item (c)
 {
+}
 
+Line::Line (Item* parent)
+       : Item (parent)
+{
 }
 
 void
@@ -159,7 +162,7 @@ Line::set_y1 (Coord y1)
 bool
 Line::covers (Duple const & point) const
 {
-       const Duple p = canvas_to_item (point);
+       const Duple p = window_to_item (point);
        static const Distance threshold = 2.0;
 
        /* this quick check works for vertical and horizontal lines, which are
@@ -180,7 +183,7 @@ Line::covers (Duple const & point) const
        double t;
        Duple a (_points[0]);
        Duple b (_points[1]);
-       const Rect visible (_canvas->visible_area());
+       const Rect visible (window_to_item (_canvas->visible_area()));
 
        /*
           Clamp the line endpoints to the visible area of the canvas. If we do