From 602a0297737d4b6d026873add1275d44cb0cbc4a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 27 Jun 2022 22:20:11 -0600 Subject: [PATCH] tempo curves: fix width so that the curve from the Nth marker does not overlap the Nth+1 --- gtk2_ardour/tempo_curve.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/tempo_curve.cc b/gtk2_ardour/tempo_curve.cc index 9b187cb018..b72093f142 100644 --- a/gtk2_ardour/tempo_curve.cc +++ b/gtk2_ardour/tempo_curve.cc @@ -67,7 +67,7 @@ TempoCurve::TempoCurve (PublicEditor& ed, ArdourCanvas::Item& parent, guint32 rg , _end_text (0) { /* XXX x arg for Duple should probably be marker width, passed in from owner */ - group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple (marker_width, 1)); + group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple (marker_width + 1, 1)); #ifdef CANVAS_DEBUG group->name = string_compose ("TempoCurve::group for %1", _tempo->note_types_per_minute()); #endif @@ -138,7 +138,7 @@ TempoCurve::set_duration (samplecnt_t duration) const double y_pos = (curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height); points.push_back (ArdourCanvas::Duple (0.0, y_pos)); - points.push_back (ArdourCanvas::Duple (duration_pixels, y_pos)); + points.push_back (ArdourCanvas::Duple (duration_pixels - _marker_width - 1, y_pos)); } else { @@ -164,7 +164,7 @@ TempoCurve::set_duration (samplecnt_t duration) tempo_at = _tempo->note_types_per_minute_at_DOUBLE (timepos_t (end)); y_pos = std::max ((curve_height) - (((tempo_at - _min_tempo) / (_max_tempo - _min_tempo)) * curve_height), 0.0); - points.push_back (ArdourCanvas::Duple (editor.sample_to_pixel (end), std::min (y_pos, curve_height))); + points.push_back (ArdourCanvas::Duple (editor.sample_to_pixel (end) - _marker_width - 1, std::min (y_pos, curve_height))); } _curve->set (points);