]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie.cc
* lily/score.cc (Score): unprotect copy of Output_def. Plugs
[lilypond.git] / lily / tie.cc
index 4f28e224642561852e7654add8dd93dc81a8a056..1899046dc051710c5d8111e7ed98ebd36605d336 100644 (file)
@@ -139,7 +139,7 @@ Tie::get_control_points (SCM smob)
     headdir = RIGHT;
   else
     {
-      programming_error ("Tie without heads.");
+      programming_error ("tie without heads");
       me->suicide ();
       return SCM_EOL;
     }
@@ -308,7 +308,7 @@ Tie::get_control_points (SCM smob)
        = (b.control_[1][Y_AXIS] - y0) * ((newy - y0) / (y - y0)) + y0;
     }
   else
-    programming_error ("Tie is nowhere horizontal");
+    programming_error ("tie is nowhere horizontal");
 
   SCM controls = SCM_EOL;
   for (int i = 4; i--;)
@@ -346,13 +346,28 @@ Tie::print (SCM smob)
       i++;
     }
 
-  Stencil a = Lookup::slur (b,
-                           get_grob_direction (me) * staff_thick,
-                           thick);
+  Stencil a;
 
+  SCM p = me->get_property ("dash-period");
+  SCM f = me->get_property ("dash-fraction");
+  if (scm_is_number (p) && scm_is_number (f))
+    a = Lookup::dashed_slur (b,
+                            thick,
+                            robust_scm2double (p, 1.0),
+                            robust_scm2double (f, 0));
+  else
+    a = Lookup::slur (b,
+                     get_grob_direction (me) * staff_thick,
+                     thick);
+
+  
   return a.smobbed_copy ();
 }
 
-ADD_INTERFACE (Tie, "tie-interface",
+ADD_INTERFACE (Tie,
+              "tie-interface",
               "A tie connecting two noteheads.\n",
-              "y-offset staffline-clearance control-points head-pair details thickness x-gap direction minimum-length");
+              
+              "y-offset dash-period dash-fraction "
+              "staffline-clearance control-points head-pair "
+              "details thickness x-gap direction minimum-length");