AU: mark preset dirty when parameter changes
[ardour.git] / gtk2_ardour / hit.cc
index 62d0b0baf60f6a747d21e6264e611caeeba4442e..41944eb3aff02f679cc66ee6272482dff822f4e0 100644 (file)
@@ -17,6 +17,8 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include "temporal/beats.h"
+
 #include "evoral/Note.hpp"
 
 #include "canvas/polygon.h"
@@ -27,7 +29,7 @@
 using namespace ARDOUR;
 using namespace ArdourCanvas;
 
-Hit::Hit (MidiRegionView& region, Item* parent, double size, const boost::shared_ptr<NoteType> note, bool with_events) 
+Hit::Hit (MidiRegionView& region, Item* parent, double size, const boost::shared_ptr<NoteType> note, bool with_events)
        : NoteBase (region, with_events, note)
 {
        _polygon = new ArdourCanvas::Polygon (parent);
@@ -76,8 +78,8 @@ Hit::hide ()
        _polygon->hide ();
 }
 
-void
-Hit::set_height (Distance height)
+Points
+Hit::points(Distance height)
 {
        /* draw a diamond */
 
@@ -89,7 +91,19 @@ Hit::set_height (Distance height)
        p.push_back (Duple (+half_height, 0)); // right, middle
        p.push_back (Duple (0, +half_height)); // bottom
 
-       _polygon->set (p);
+       return p;
+}
+
+void
+Hit::set_height (Distance height)
+{
+       _polygon->set (points(height));
+}
+
+Duple
+Hit::position ()
+{
+       return _polygon->position ();
 }
 
 void