_size = 4.0;
_item = new ArdourCanvas::Rectangle (&_line.canvas_group());
- _item->property_draw() = true;
- _item->set_fill (false);
- _item->set_fill_color (ARDOUR_UI::config()->get_canvasvar_ControlPointFill());
- _item->set_outline_color (ARDOUR_UI::config()->get_canvasvar_ControlPointOutline());
- _item->set_outline_width (1);
+ _item->set_fill (true);
+ _item->set_fill_color (ARDOUR_UI::config()->color ("control point fill"));
+ _item->set_outline_color (ARDOUR_UI::config()->color ("control point outline"));
_item->set_data ("control_point", this);
_item->Event.connect (sigc::mem_fun (this, &ControlPoint::event_handler));
hide ();
- set_visible (false);
}
ControlPoint::ControlPoint (const ControlPoint& other, bool /*dummy_arg_to_force_special_copy_constructor*/)
_size = other._size;
_item = new ArdourCanvas::Rectangle (&_line.canvas_group());
- _item->set_fill (false);
- _item->set_outline_color (ARDOUR_UI::config()->get_canvasvar_ControlPointOutline());
- _item->set_outline_width (1);
+ _item->set_fill (true);
+ _item->set_outline_color (ARDOUR_UI::config()->color ("control point outline"));
/* NOTE: no event handling in copied ControlPoints */
hide ();
- set_visible (false);
}
ControlPoint::~ControlPoint ()
_item->show();
}
-void
-ControlPoint::set_visible (bool yn)
-{
- _item->property_draw() = (gboolean) yn;
-}
-
bool
ControlPoint::visible () const
{
- return _item->property_draw ();
+ return _item->visible ();
}
void
void
ControlPoint::set_color ()
{
- uint32_t color = 0;
-
if (_selected) {
- color = ARDOUR_UI::config()->get_canvasvar_ControlPointSelected();
+ _item->set_outline_color(ARDOUR_UI::config()->color ("control point selected outline"));;
+ _item->set_fill_color(ARDOUR_UI::config()->color ("control point selected fill"));
} else {
- color = ARDOUR_UI::config()->get_canvasvar_ControlPointOutline();
+ _item->set_outline_color(ARDOUR_UI::config()->color ("control point outline"));
+ _item->set_fill_color(ARDOUR_UI::config()->color ("control point fill"));
}
-
- _item->set_outline_color (color);
- _item->set_fill_color (ARDOUR_UI::config()->get_canvasvar_ControlPointFill());
}
void
_shape = shape;
}
-void
-ControlPoint::i2w (double& x, double& y) const
+ArdourCanvas::Item&
+ControlPoint::item() const
{
- _item->item_to_canvas (x, y);
+ return *_item;
}