]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie.cc
release: 1.1.33
[lilypond.git] / lily / tie.cc
index cc68a065e33f67258edef983ee95c30de0632249..5aa2d11446b627b306e170b4a596231ffe709f0c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "paper-def.hh"
@@ -64,9 +64,9 @@ Tie::do_post_processing()
   // URG: share code with slur!
   assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]);
 
-  Real notewidth = paper ()->note_width ();
+  // URG
+  Real notewidth = paper ()->note_width () * 0.8;
   Real interline_f = paper ()->interline_f ();
-  Real tie_min = paper ()->get_var ("tie_x_minimum");
 
   /* 
    [OSU]: slur and tie placement
@@ -121,20 +121,6 @@ Tie::do_post_processing()
       // tie attached to outer notehead
       if (!head_l_drul_[d])
        {
-
-       /*
-        urg, this is broken
-        but who *is* going to assure that dx >= tie_min?
-        */
-#if 0
-         if (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT] < tie_min)
-           {
-//           dx_f_drul_[d] -= d * tie_min 
-//             - (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
-             dx_f_drul_[d] = dx_f_drul_[(Direction)-d] + d * tie_min;
-           }
-#endif
-
          dy_f_drul_[d] = dy_f_drul_[(Direction) -d];
        }
     }
@@ -151,12 +137,12 @@ Tie::do_post_processing()
 
   Real ratio_f = abs (d_off.y () / d_off.x ());
   if (ratio_f > damp_f)
-    dy_f_drul_[(Direction)(- dir_ * sign (d_off.y ()))] -=
-      dir_ * (damp_f - ratio_f) * d_off.x ();
+    dy_f_drul_[(Direction)(- dir_ * sign (d_off.y ()))] +=
+      dir_ * (ratio_f - damp_f) * d_off.x ();
 }
 
 void
-Tie::do_substitute_dependency (Score_element*o, Score_element*n)
+Tie::do_substitute_element_pointer (Score_element*o, Score_element*n)
 {
   Note_head *new_l =n?dynamic_cast<Note_head *> (n):0;
   if (dynamic_cast <Item *> (o) == head_l_drul_[LEFT])
@@ -165,3 +151,23 @@ Tie::do_substitute_dependency (Score_element*o, Score_element*n)
     head_l_drul_[RIGHT] = new_l;
 }
 
+#if 0
+Interval
+Tie::do_width () const
+{
+  Real min_f = 
+  Interval width_int = Bow::do_width ();
+  return width_int.length () < min_f ? Interval (0, min_f) : width_int;
+}
+#endif
+
+Array<Rod>
+Tie::get_rods () const
+{
+  Array<Rod> a;
+  Rod r;
+  r.item_l_drul_ = spanned_drul_;
+  r.distance_f_ = paper ()->get_var ("tie_x_minimum");
+  a.push (r);
+  return a;
+}