CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/08/15 18:47:48

Modified files:
        .              : ChangeLog 
        input/regression: tuplet-slope.ly 
        lily           : tuplet-bracket.cc 

Log message:
        * input/regression/tuplet-slope.ly: add a test case.
        
        * lily/tuplet-bracket.cc (calc_position_and_height): revert
        erroneous fix. Add spanner bounds to offset array with relative X
        positions.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4009&tr2=1.4010&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/tuplet-slope.ly.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/tuplet-bracket.cc.diff?tr1=1.101&tr2=1.102&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.4009 lilypond/ChangeLog:1.4010
--- lilypond/ChangeLog:1.4009   Mon Aug 15 18:28:40 2005
+++ lilypond/ChangeLog  Mon Aug 15 18:47:47 2005
@@ -1,5 +1,11 @@
 2005-08-15  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
+       * input/regression/tuplet-slope.ly: add a test case.
+
+       * lily/tuplet-bracket.cc (calc_position_and_height): revert
+       erroneous fix. Add spanner bounds to offset array with relative X
+       positions.
+
        * ly/engraver-init.ly: add Rest_engraver only once.
 
        * scm/define-music-display-methods.scm (KeyChangeEvent): only do
Index: lilypond/input/regression/tuplet-slope.ly
diff -u lilypond/input/regression/tuplet-slope.ly:1.13 
lilypond/input/regression/tuplet-slope.ly:1.14
--- lilypond/input/regression/tuplet-slope.ly:1.13      Sun Jun 26 22:39:14 2005
+++ lilypond/input/regression/tuplet-slope.ly   Mon Aug 15 18:47:48 2005
@@ -11,19 +11,24 @@
 
 }
 
+\layout {
+  raggedright = ##t 
+}
 
 \version "2.6.0"
 
-\score {
-     \relative c' {
-       \times 4/5 { a'4 as g fis f }
-       \times 4/5 { fis4 e es d des }
-       \times 4/5 { fis,4 e es d des }
-       \times 4/5 { bes'''4 bes,, b c cis }
-       \times 4/5 { a''4 b b c cis }
-    }
-    \layout {
-       raggedright = ##t 
-    }
+\new Voice {
+  \relative c'' {
+    \times 2/3 { c4 d e}
+    \times 2/3 { c4 d e}
+  }
+  
+  \relative c' {
+    \times 4/5 { a'4 as g fis f }
+    \times 4/5 { fis4 e es d des }
+    \times 4/5 { fis,4 e es d des }
+    \times 4/5 { bes'''4 bes,, b c cis }
+    \times 4/5 { a''4 b b c cis }
+  }
 }
 
Index: lilypond/lily/tuplet-bracket.cc
diff -u lilypond/lily/tuplet-bracket.cc:1.101 
lilypond/lily/tuplet-bracket.cc:1.102
--- lilypond/lily/tuplet-bracket.cc:1.101       Sat Aug 13 21:35:22 2005
+++ lilypond/lily/tuplet-bracket.cc     Mon Aug 15 18:47:48 2005
@@ -443,14 +443,9 @@
   Real x0 = robust_relative_extent (lgr, commonx, X_AXIS)[LEFT];
   Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
 
-  /*
-    offset
-  */
-  Real factor = columns.size () > 1 ? 1 / (x1 - x0) : 1.0;
-
   Array<Offset> points;
-  points.push (Offset (x0, staff[dir]));
-  points.push (Offset (x1, staff[dir]));
+  points.push (Offset (x0 - x0, staff[dir]));
+  points.push (Offset (x1 - x0, staff[dir]));
 
   for (int i = 0; i < columns.size (); i++)
     {
@@ -502,13 +497,14 @@
       while (flip (&d) != LEFT);
     }
 
+  Real factor = (columns.size () > 1) ? 1 / (x1 - x0) : 1.0;
   for (int i = 0; i < points.size (); i++)
     {
       Real x = points[i][X_AXIS];
-      Real tuplety = *dy * x * factor;
+      Real tuplety = (*dy) * x * factor;
 
       if (points[i][Y_AXIS] * dir > (*offset + tuplety) * dir)
-       *offset = points[i][Y_AXIS] - tuplety * sign (*dy) * dir;
+       *offset = points[i][Y_AXIS] - tuplety;
     }
 
   *offset += scm_to_double (me->get_property ("padding")) * dir;


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

Reply via email to