From bb05ae05a8d1b99f7357e576edaee9a73d75cd10 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 26 Jan 2014 16:02:38 -0500 Subject: [PATCH] remove unused _wave_color member from waveview canvas item; use outline color for edge dots of waveforms instead of hardcoding black --- libs/canvas/canvas/wave_view.h | 1 - libs/canvas/wave_view.cc | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libs/canvas/canvas/wave_view.h b/libs/canvas/canvas/wave_view.h index b80ae5183d..791d0d17da 100644 --- a/libs/canvas/canvas/wave_view.h +++ b/libs/canvas/canvas/wave_view.h @@ -138,7 +138,6 @@ private: int _channel; double _samples_per_pixel; Coord _height; - Color _wave_color; bool _show_zero; Color _zero_color; Color _clip_color; diff --git a/libs/canvas/wave_view.cc b/libs/canvas/wave_view.cc index c36ee8f147..110e681969 100644 --- a/libs/canvas/wave_view.cc +++ b/libs/canvas/wave_view.cc @@ -58,7 +58,6 @@ WaveView::WaveView (Group* parent, boost::shared_ptr region , _channel (0) , _samples_per_pixel (0) , _height (64) - , _wave_color (0xffffffff) , _show_zero (false) , _zero_color (0xff0000ff) , _clip_color (0xff0000ff) @@ -351,7 +350,7 @@ WaveView::draw_image (PeakData* _peaks, int n_peaks) const if (_global_show_waveform_clipping) { - context->set_source_rgba (0, 0, 0, 1.0); + set_source_rgba (context, _outline_color); /* the height of the clip-indicator should be at most 7 pixels, or 5% of the height of the waveview item. @@ -365,10 +364,10 @@ WaveView::draw_image (PeakData* _peaks, int n_peaks) const tips[i].clip_max; if (show_top_clip) { - context->set_source_rgba (1.0, 0, 0, 1.0); + set_source_rgba (context, _clip_color); context->rel_line_to (0, clip_height); context->stroke (); - context->set_source_rgba (0.0, 0, 0, 1.0); + set_source_rgba (context, _outline_color); } else { context->rel_line_to (0, 1.0); context->stroke (); @@ -377,10 +376,10 @@ WaveView::draw_image (PeakData* _peaks, int n_peaks) const if (_shape != WaveView::Rectified) { context->move_to (i, tips[i].bot); if (tips[i].clip_min) { - context->set_source_rgba (1.0, 0, 0, 1.0); + set_source_rgba (context, _clip_color); context->rel_line_to (0, -clip_height); context->stroke (); - context->set_source_rgba (0.0, 0, 0, 1.0); + set_source_rgba (context, _outline_color); } else { context->rel_line_to (0, -1.0); context->stroke ();