summaryrefslogtreecommitdiff
path: root/gtk2_ardour/hit.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-28 21:31:33 -0500
committerDavid Robillard <d@drobilla.net>2014-12-28 21:31:33 -0500
commitd283608fe9ece413838ddd7f530901e96c5bceda (patch)
treee6642806bcf7b3604e0937aa8a9f37d036e41c15 /gtk2_ardour/hit.cc
parent606efb601c15fa966a3b34cbda07b2d05be8c5b0 (diff)
Automation ghost notes for percussive hits.
Diffstat (limited to 'gtk2_ardour/hit.cc')
-rw-r--r--gtk2_ardour/hit.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/gtk2_ardour/hit.cc b/gtk2_ardour/hit.cc
index 62d0b0baf6..42117f9add 100644
--- a/gtk2_ardour/hit.cc
+++ b/gtk2_ardour/hit.cc
@@ -76,8 +76,8 @@ Hit::hide ()
_polygon->hide ();
}
-void
-Hit::set_height (Distance height)
+Points
+Hit::points(Distance height)
{
/* draw a diamond */
@@ -89,7 +89,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