CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/08/21 13:48:12

Modified files:
        Documentation/topdocs: NEWS.tely 
        lily           : tie.cc 

Log message:
        (get_control_points): rewrite. Put short ties in
        staff-spaces, make long ties cross staff lines. Avoid flags and dots.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/topdocs/NEWS.tely.diff?tr1=1.72&tr2=1.73&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/tie.cc.diff?tr1=1.145&tr2=1.146&r1=text&r2=text

Patches:
Index: lilypond/Documentation/topdocs/NEWS.tely
diff -u lilypond/Documentation/topdocs/NEWS.tely:1.72 
lilypond/Documentation/topdocs/NEWS.tely:1.73
--- lilypond/Documentation/topdocs/NEWS.tely:1.72       Fri Aug 19 18:48:05 2005
+++ lilypond/Documentation/topdocs/NEWS.tely    Sun Aug 21 13:48:12 2005
@@ -36,6 +36,21 @@
 
 
 @itemize @bullet
[EMAIL PROTECTED]
+Formatting of isolated, single ties has been improved. Now, ties avoid
+staff lines, flags and dots, without compromising their shape.
+
[EMAIL PROTECTED],raggedright]
+\relative c'' {
+  \stemUp
+  c16 c2...~ c16 ~ c2... |
+  c4~c8 c8~c16 c16~c32 c16.~[ c64]~ c64[ c8..] |
+}
[EMAIL PROTECTED] lilypond
+
+This improvement has been sponsored by Bertalan Fodor, Jay Hamilton,
+Kieren MacMillan, Steve Doonan, by Trevor Baca, and Vincent SD.
+ 
 
 @item
 With the @code{countPercentRepeats} property,
@@ -79,7 +94,7 @@
 }
 @end lilypond  
 
-This feature was sponsored by Trevor [EMAIL PROTECTED] 
+This feature was sponsored by Trevor Baca. 
 
 @item
 When @code{strict-note-spacing} is set, notes are spaced without regard
@@ -90,7 +105,7 @@
 \new Staff { c8[ c \clef alto c \grace { c16[ c] } c8 c c]  c32[ c32] }
 @end lilypond
 
-This feature was sponsored by Trevor [EMAIL PROTECTED] 
+This feature was sponsored by Trevor Baca. 
 
 @item
 Beams support the @code{break-overshoot} property, for example
@@ -101,7 +116,7 @@
 c2.. c8[ \break c]
 @end lilypond
  
-This feature was sponsored by Trevor [EMAIL PROTECTED] 
+This feature was sponsored by Trevor Baca. 
 
 @item
 Proportional notation is supported.  Notes can be spaced proportional
@@ -116,7 +131,7 @@
 >>
 @end lilypond
 
-This feature was sponsored by Trevor [EMAIL PROTECTED]
+This feature was sponsored by Trevor Baca.
 
 @item 
 Symbol sizes (e.g. accidentals) are disregarded for spacing if
@@ -134,7 +149,7 @@
 >>
 @end lilypond
 
-This feature was sponsored by Trevor [EMAIL PROTECTED]
+This feature was sponsored by Trevor Baca.
  
 @item
 Endings of broken tuplet brackets can be tuned.  For example, you can
@@ -150,7 +165,7 @@
 }
 @end lilypond
 
-This feature was sponsored by Trevor [EMAIL PROTECTED]
+This feature was sponsored by Trevor Baca.
 
 
 @item
@@ -165,7 +180,7 @@
 }
 @end lilypond
 
-These glyphs have been sponsored by Trevor [EMAIL PROTECTED]
+These glyphs have been sponsored by Trevor Baca.
 
 
 @item
@@ -179,7 +194,7 @@
 }
 @end lilypond
 
-This feature was sponsored by Trevor [EMAIL PROTECTED]
+This feature was sponsored by Trevor Baca.
 
 @item
 Music expressions can be displayed, in LilyPond notation, using the
Index: lilypond/lily/tie.cc
diff -u lilypond/lily/tie.cc:1.145 lilypond/lily/tie.cc:1.146
--- lilypond/lily/tie.cc:1.145  Sun Aug 21 13:11:51 2005
+++ lilypond/lily/tie.cc        Sun Aug 21 13:48:12 2005
@@ -137,11 +137,12 @@
     }
 
   set_direction (me);
-
+  int tie_position = (int) Tie::get_position (me);
+  
   Direction dir = get_grob_direction (me);
 
   Real staff_space = Staff_symbol_referencer::staff_space (me);
-  Real staff_position = Tie::get_position (me);
+  Real staff_position = tie_position;
 
   Grob *common[NO_AXES];
   for (int a = X_AXIS; a < NO_AXES; a++)
@@ -230,7 +231,7 @@
     Avoid dot
    */
   Grob *left_dot = unsmob_grob (me->get_bound (LEFT)->get_object ("dot"));
-  if (left_dot && in_space && fits_in_space)
+  if (left_dot && in_space)
     {
       if (staff_position == Staff_symbol_referencer::get_position (left_dot))
        {
@@ -258,7 +259,7 @@
     Putting larger in-space ties next to the notes forces
     the edges to be opposite (Y-wise) to the tie direction.
    */
-  if (staff_position == Tie::get_position (me)
+  if (staff_position == tie_position
       && in_space
       && dy > 0.3 * staff_space)
     {
@@ -280,7 +281,7 @@
 
   if (!in_between
       && in_space
-      && fabs (staff_position - Tie::get_position (me)) <= 1)
+      && fabs (staff_position - tie_position) <= 1)
     staff_position += 2*dir;
   
   
@@ -308,10 +309,15 @@
     }
   else
     {
-      Real rounding_dy = (1.5 * dir  - middle[Y_AXIS]);
+      Real where = 0.5 * dir;
       
+      Real rounding_dy = (where - middle[Y_AXIS]);
       b.translate (Offset (0,
                           0.5 * staff_position * staff_space + rounding_dy));
+
+      if (dir * b.curve_point (0.0)[Y_AXIS] <
+         dir * tie_position * 0.5 * staff_space)
+       b.translate (Offset (0, staff_space * dir)); 
     }
   
   b.translate (Offset (attachments[LEFT]


_______________________________________________
Lilypond-cvs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to