Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "temporal/beats.h"
+
#include "evoral/Note.hpp"
#include "canvas/polygon.h"
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);
_polygon->hide ();
}
-void
-Hit::set_height (Distance height)
+Points
+Hit::points(Distance height)
{
/* draw a diamond */
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