diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-01-25 05:35:46 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-01-25 05:35:46 +0000 |
commit | d3f64c28489d2358498b9d7dcfc6fa4228ebd63e (patch) | |
tree | 8195496c9330bb4fb279d282598da6dc5c98a361 /gtk2_ardour/time_axis_view.cc | |
parent | 28e6ad009158ddaea80fd5d800befcbf58ce47ee (diff) |
meet rhythm ferret: cute, furry and always on time (ardour build now requires fftw3 & fftw3f, no exceptions, ever)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2959 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index c4f5a558ab..c6dc773dd8 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -43,6 +43,7 @@ #include "public_editor.h" #include "time_axis_view.h" #include "simplerect.h" +#include "simpleline.h" #include "selection.h" #include "keyboard.h" #include "rgb_macros.h" @@ -1099,3 +1100,37 @@ TimeAxisView::covers_y_position (double y) return 0; } + +void +TimeAxisView::show_temporary_lines (const vector<nframes64_t>& pos) +{ + while (temp_lines.size()< pos.size()) { + ArdourCanvas::SimpleLine* l = new ArdourCanvas::SimpleLine (*canvas_display); + l->property_color_rgba() = (guint) ARDOUR_UI::config()->canvasvar_ZeroLine.get(); + l->property_y1() = 0; + l->property_y2() = height; + temp_lines.push_back (l); + } + + while (temp_lines.size() > pos.size()) { + ArdourCanvas::SimpleLine *line = temp_lines.back(); + temp_lines.pop_back (); + delete line; + } + + vector<nframes64_t>::const_iterator i; + list<ArdourCanvas::SimpleLine*>::iterator l; + + for (i = pos.begin(), l = temp_lines.begin(); i != pos.end() && l != temp_lines.end(); ++i, ++l) { + (*l)->property_x1() = editor.frame_to_pixel ((double) *i); + (*l)->property_x2() = editor.frame_to_pixel ((double) *i); + } +} + +void +TimeAxisView::hide_temporary_lines () +{ + for (list<ArdourCanvas::SimpleLine*>::iterator l = temp_lines.begin(); l != temp_lines.end(); ++l) { + (*l)->hide (); + } +} |