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
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
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