diff options
author | nick_m <mainsbridge@gmail.com> | 2016-05-18 04:47:40 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-05-27 23:38:16 +1000 |
commit | 058b78125828f28e387922f2f10260e82e156472 (patch) | |
tree | ca6265680aea5890530e2dab0a34419a792fe590 /gtk2_ardour/marker.cc | |
parent | 0c7ecc6cbb4baaa6d4aebcf7f4ff682b67f6b64c (diff) |
Tempo ramps - tempo marker's mark indicates curve height ar point.
Diffstat (limited to 'gtk2_ardour/marker.cc')
-rw-r--r-- | gtk2_ardour/marker.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index 2d9da96b0f..c018ba54e7 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -535,6 +535,25 @@ TempoMarker::~TempoMarker () { } +void +TempoMarker::update_height_mark (const double& ratio) +{ + const double MH = marker_height; + const double top = MH * (1 - ratio); + const double M3 = std::max(1.f, rintf(3.f * UIConfiguration::instance().get_ui_scale())); + const double M6 = std::max(2.f, rintf(6.f * UIConfiguration::instance().get_ui_scale())); + + points = new ArdourCanvas::Points (); + points->push_back (ArdourCanvas::Duple ( M3, top)); + points->push_back (ArdourCanvas::Duple ( M6, min (top + (MH * .6), MH))); + points->push_back (ArdourCanvas::Duple ( M6, MH)); + points->push_back (ArdourCanvas::Duple (0.0, MH)); + points->push_back (ArdourCanvas::Duple (0.0, min (top + (MH * .6), MH))); + points->push_back (ArdourCanvas::Duple ( M3, top)); + + mark->set (*points); +} + /***********************************************************************/ MeterMarker::MeterMarker (PublicEditor& editor, ArdourCanvas::Container& parent, guint32 rgba, const string& text, |