]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/line-spanner.cc
Assures smooth transitions at glissando line breaks.
[lilypond.git] / lily / line-spanner.cc
index 082db2f4b6b85b228b4a8055b9397d3900798ff9..5936342d09a849b1c3308a124be8dfb4d34ec96d 100644 (file)
@@ -283,6 +283,12 @@ Line_spanner::print (SCM smob)
       return SCM_EOL;
     }
 
+  Interval normalized_endpoints = robust_scm2interval (me->get_property ("normalized-endpoints"), Interval (0, 1));
+  Real y_length = span_points[RIGHT][Y_AXIS] - span_points[LEFT][Y_AXIS];
+
+  span_points[LEFT][Y_AXIS] += normalized_endpoints[LEFT] * y_length;
+  span_points[RIGHT][Y_AXIS] -= (1 - normalized_endpoints[RIGHT]) * y_length;
+
   Stencil line;
   do
     {