]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie.cc
*** empty log message ***
[lilypond.git] / lily / tie.cc
index bb011b973d0707439dbee616a8c98de153fce5fb..ec11531206098f38a06ae346ed74eee4d4963876 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include <math.h>
 
@@ -50,14 +50,8 @@ void
 Tie::set_interface (Grob*me)
 {
   me->set_grob_property ("heads", gh_cons (SCM_EOL, SCM_EOL));
-  me->set_interface (ly_symbol2scm ("tie-interface"));
 }
 
-bool
-Tie::has_interface (Grob*me)
-{
-  return me->has_interface (ly_symbol2scm ("tie-interface"));
-}
 
 Grob*
 Tie::head (Grob*me, Direction d) 
@@ -110,7 +104,7 @@ Tie::get_default_dir (Grob*me)
 SCM
 Tie::get_control_points (SCM smob)
 {  
-  Spanner*me = dynamic_cast<Spanner*> (unsmob_grob (smob));
+  Spanner*me = unsmob_spanner (smob);
   Direction headdir = CENTER; 
   if (head (me,LEFT))
     headdir = LEFT;
@@ -139,12 +133,11 @@ Tie::get_control_points (SCM smob)
   Real left_x;
 
   /*
-    this is a kludge: the tie has to be long enough to be
-    visible, but should not go through key sigs.
-
- (please fixme)
+     the tie has to be long enough to be visible, but should not go
+    through key sigs. In the 1.5 series the pref.matter - note
+    distance is fixed , so this won't be a problem anymore.
    */
-  Real lambda = 0.5;           
+  Real lambda = 0.9;           
   
   if (Note_head::has_interface (l))
     left_x = l->extent (l, X_AXIS)[RIGHT] + x_gap_f;
@@ -295,7 +288,7 @@ Tie::brew_molecule (SCM smob)
   
   Real thick =
     gh_scm2double (me->get_grob_property ("thickness"))
-    * me->paper_l ()->get_var ("stafflinethickness");
+    * me->paper_l ()->get_var ("linethickness");
 
   Bezier b;
   int i = 0;
@@ -311,3 +304,8 @@ Tie::brew_molecule (SCM smob)
 }
 
 
+
+ADD_INTERFACE (Tie,"tie-interface",
+  "A tie connecting two noteheads.
+direction = Forced direction for all ties",
+  "y-offset staffline-clearance control-points heads details thickness x-gap direction minimum-length");