]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie.cc
* stepmake/stepmake/omf-targets.make (local-install): add
[lilypond.git] / lily / tie.cc
index 5bac5978e73bb808687ab1c5ca570017e1b000d2..99cf426d5c77a5ce8d09aa7d2e89ae8f1b72543a 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include <math.h>
 
 
 
 void
-Tie::set_head (Grob*me,Direction d, Item * head_l)
+Tie::set_head (Grob*me,Direction d, Grob * h)
 {
   assert (!head (me,d));
-  index_set_cell (me->get_grob_property ("heads"), d, head_l->self_scm ());
+  index_set_cell (me->get_grob_property ("heads"), d, h->self_scm ());
   
-  dynamic_cast<Spanner*> (me)->set_bound (d, head_l);
-  me->add_dependency (head_l);
+  dynamic_cast<Spanner*> (me)->set_bound (d, h);
+  me->add_dependency (h);
 }
 
 void
@@ -57,16 +57,16 @@ Grob*
 Tie::head (Grob*me, Direction d) 
 {
   SCM c = me->get_grob_property ("heads");
-  c = index_cell (c, d);
+  c = index_get_cell (c, d);
 
   return unsmob_grob (c);
 }
 
 Real
-Tie::position_f (Grob*me) 
+Tie::get_position (Grob*me) 
 {
   Direction d = head (me,LEFT) ? LEFT:RIGHT;
-  return Staff_symbol_referencer::position_f (head (me,d));
+  return Staff_symbol_referencer::get_position (head (me,d));
 }
 
 
@@ -81,8 +81,8 @@ Tie::position_f (Grob*me)
 Direction
 Tie::get_default_dir (Grob*me) 
 {
-  Item * sl =  head (me,LEFT) ? Rhythmic_head::stem_l (head (me,LEFT)) :0;
-  Item * sr =  head (me,RIGHT) ? Rhythmic_head::stem_l (head (me,RIGHT)) :0;  
+  Item * sl =  head (me,LEFT) ? Rhythmic_head::get_stem (head (me,LEFT)) :0;
+  Item * sr =  head (me,RIGHT) ? Rhythmic_head::get_stem (head (me,RIGHT)) :0;  
 
   if (sl && sr)
     {
@@ -198,16 +198,16 @@ Tie::get_control_points (SCM smob)
 
   */
 
-  Real ypos = Tie::position_f (me) * staff_space/2
+  Real ypos = Tie::get_position (me) * staff_space/2
     + dir * gh_scm2double (me->get_grob_property ("y-offset"));;
 
   /*
     Make sure we don't start on a dots
    */
-  if (Note_head::has_interface (l) && Rhythmic_head::dots_l (l))
+  if (Note_head::has_interface (l) && Rhythmic_head::get_dots (l))
     {
-      Grob* dots = Rhythmic_head::dots_l(l);
-      if(fabs (staff_space * Staff_symbol_referencer::position_f (dots) /2
+      Grob* dots = Rhythmic_head::get_dots (l);
+      if(fabs (staff_space * Staff_symbol_referencer::get_position (dots) /2
               - ypos) < 0.5)
        {
          ypos += 0.5 * dir ;
@@ -249,7 +249,8 @@ Tie::get_control_points (SCM smob)
 
       Real clear = staff_space * gh_scm2double (me->get_grob_property ("staffline-clearance"));
 
-      if (fabs (y) <= Staff_symbol_referencer::staff_radius (me)
+      if (fabs (y) <=
+         Staff_symbol_referencer::staff_radius (me) * staff_space + clear
          && fabs (diff) < clear)
        {
          Real y1 = ry + clear;
@@ -312,7 +313,7 @@ Tie::brew_molecule (SCM smob)
   
   Real thick =
     gh_scm2double (me->get_grob_property ("thickness"))
-    * me->paper_l ()->get_var ("linethickness");
+    * me->get_paper ()->get_var ("linethickness");
 
   Bezier b;
   int i = 0;
@@ -330,6 +331,6 @@ Tie::brew_molecule (SCM smob)
 
 
 ADD_INTERFACE (Tie,"tie-interface",
-  "A tie connecting two noteheads.
-direction = Forced direction for all ties",
+  "A tie connecting two noteheads.\n"
+"direction = Forced direction for all ties",
   "y-offset staffline-clearance control-points heads details thickness x-gap direction minimum-length");