]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bezier-bow.cc
* ly/engraver-init.ly (AncientRemoveEmptyStaffContext): set
[lilypond.git] / lily / bezier-bow.cc
index 85d116e78c0725671c357363340009a619806803..7d7b640a54ff40ff6a2900685c3efef7b9e222bb 100644 (file)
@@ -83,17 +83,30 @@ height   <indent>
   
   */
 
+void
+get_slur_indent_height (Real * indent, Real *height,
+                       Real width, Real h_inf, Real r_0)
+{
+  *height =  slur_height (width, h_inf, r_0);
+  *indent = (width/(h_inf+ width)*1.5 + 0.5) * (*height);
+}
+
+
+
+
 Bezier
 slur_shape (Real width, Real h_inf, Real r_0)
 {
-  Bezier curve;
-  Real height =  slur_height (width, h_inf, r_0);
-  Real indent = (width/(h_inf+ width)*1.5 + 0.5) * height;
+  Real indent;
+  Real height;
+  
+  get_slur_indent_height (&indent, &height,
+                         width,  h_inf,  r_0);
 
+  Bezier curve;
   curve.control_[0] = Offset (0, 0);
   curve.control_[1] = Offset (indent, height);
   curve.control_[2] = Offset (width - indent, height);
   curve.control_[3] = Offset (width, 0);
   return curve;
 }
-