, _gradient_depth_independent (false)
, _amplitude_above_axis (1.0)
, _region_amplitude (_region->scale_amplitude ())
+ , _start_shift (0.0)
, _region_start (region->start())
{
VisualPropertiesChanged.connect_same_thread (invalidation_connection, boost::bind (&WaveView::handle_visual_property_change, this));
color_to_hsv (_fill_color, h, s, v);
/* change v towards white */
v *= 1.0 - gradient_depth();
- Color center = hsv_to_color (h, s, v, a);
+ Color center = hsva_to_color (h, s, v, a);
color_to_rgba (center, r, g, b, a);
gradient->add_color_stop_rgba (stops[0], r, g, b, a);
* draw "between" pixels at the start and/or end.
*/
- const double draw_start = floor (draw.x0);
+ const double draw_start = floor (draw.x0) + _start_shift;
const double draw_end = floor (draw.x1);
// cerr << "Need to draw " << draw_start << " .. " << draw_end << endl;
{
if (_global_show_waveform_clipping != yn) {
_global_show_waveform_clipping = yn;
- VisualPropertiesChanged (); /* EMIT SIGNAL */
+ ClipLevelChanged ();
}
}
+
+void
+WaveView::set_start_shift (double pixels)
+{
+ if (pixels < 0) {
+ return;
+ }
+
+ begin_visual_change ();
+ _start_shift = pixels;
+ end_visual_change ();
+}
+