]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.4.3
authorfred <fred>
Wed, 27 Mar 2002 01:19:48 +0000 (01:19 +0000)
committerfred <fred>
Wed, 27 Mar 2002 01:19:48 +0000 (01:19 +0000)
lily/tie.cc
scm/grob-description.scm
scm/grob-property-description.scm

index 6e605ea07fc2ff045930f787955806267054418f..ae2be9fc11b8d24b5eab461d4f4d401084df96b3 100644 (file)
@@ -185,28 +185,16 @@ Tie::get_control_points (SCM smob)
 
   Bezier b  = slur_shape (width, h_inf, r_0);
   
-  Offset leave_dir = b.control_[1] - b.control_[0];
-
-  Grob *hed =head (me, headdir);
-  Real dx = (hed->extent (hed, X_AXIS).length () + x_gap_f)/2.0;
-  Real max_gap = leave_dir[Y_AXIS] * dx / leave_dir[X_AXIS];
-
   /*
-    for small ties (t small) we want to start in the Y-center (so dy = 0), for
-    large ties, the tie should appear to come from the center of the
-    head, so dy = max_gap
-
-    maybe use a different formula?
+    I think this better, particularly for small ties. It always allows the user to move ties if
+    they seem in the wrong place
 
     TODO: what if 2 heads have different size.
 
-    TODO: for small ties, it is better to start over the heads
-    iso. next to the heads. 
   */
-  Real t = (width / staff_space - 5.0);        // ugh.
-  Real dy = t > 0 ? max_gap * sqr (t / (1 + t)) : 0.0;
 
-  Real ypos = Tie::position_f (me) * staff_space/2 + dir * dy;
+  Real ypos = Tie::position_f (me) * staff_space/2
+    + dir * gh_scm2double (me->get_grob_property ("y-offset"));;
 
   /*
     Make sure we don't start on a dots
index 78e498658ded2795436dc88ea54c88c43d51cbca..9d19e537d0023c0cff1927bc06a8a1cee314e72b 100644 (file)
 
                (direction . 1)
                (breakable . #t)
-               (font-family . number)
+               (font-family . roman)
                (font-shape . upright)
                (font-relative-size . 1)
                (visibility-lambda . ,end-of-line-invisible)
                (details . ((ratio . 0.333) (height-limit . 1.0)))
                (thickness . 1.2)
                (x-gap . 0.2)
+               (y-offset . 0.6)
                (minimum-length  . 2.5)
                (meta . ,(grob-description "Tie" tie-interface ))
        ))
index ef4cec6bebb0481e33752813afa373bf28a357c7..023a24668bec61e656d9803b0b77174dfc44a2b3 100644 (file)
@@ -362,4 +362,5 @@ function of type (beam multiplicity dy staff-line-thickness) -> real.  Default v
 (grob-property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics).")
 (grob-property-description 'x-gap number? "horizontal gap between notehead and tie.")
 (grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.")
+(grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.")
 (grob-property-description 'y number? "set by beam: position of left edge.")