13
0

Indicate all clips on rectified view.

This commit is contained in:
nick_m 2015-04-17 05:26:57 +10:00
parent 7f41de7427
commit ac1f7e0b9f

View File

@ -618,14 +618,19 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak
wave_context->line_to (i, tips[i].bot);
}
if (_global_show_waveform_clipping && (tips[i].clip_max)) {
/* clip indicator */
bool clipped = false;
if (_global_show_waveform_clipping && (tips[i].clip_max || tips[i].clip_min)) {
clip_context->move_to (i, tips[i].top);
/* clip-indicating upper terminal line */
clip_context->rel_line_to (0, min (clip_height, ceil(tips[i].spread + .5)));
} else {
clipped = true;
}
if (!clipped) {
outline_context->move_to (i, tips[i].top);
/* normal upper terminal dot */
outline_context->close_path ();
outline_context->rel_line_to (0, -1.0);
}
}