CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/10/03 11:30:41

Modified files:
        .              : ChangeLog VERSION 
        Documentation/topdocs: NEWS.tely 
        lily           : align-interface.cc 
        ly             : engraver-init.ly music-functions-init.ly 
        python         : convertrules.py 
        scm            : page-layout.scm 
Added files:
        input/regression: alignment-vertical-spacing.ly 

Log message:
        * input/regression/alignment-vertical-spacing.ly: new file.
        
        * python/convertrules.py (conv): add rule.
        
        * ly/music-functions-init.ly: rename outputProperty to overrideProperty
        
        * lily/align-interface.cc (stretch_after_break): new
        function. Read fixed-alignment-extra-space property.
        (align_elements_to_extents): read alignment-extra-space property.
        
        * scm/page-layout.scm (page-headfoot): annotate headsep and footsep.
        (annotate-space-left): new function. Annotate space left on page.
        (annotate-y-interval): new function.
        (paper-system-annotate-last): new function. Annotate bottom-space.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4150&tr2=1.4151&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/VERSION.diff?tr1=1.659&tr2=1.660&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/topdocs/NEWS.tely.diff?tr1=1.92&tr2=1.93&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/alignment-vertical-spacing.ly?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/align-interface.cc.diff?tr1=1.83&tr2=1.84&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ly/engraver-init.ly.diff?tr1=1.251&tr2=1.252&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ly/music-functions-init.ly.diff?tr1=1.39&tr2=1.40&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/python/convertrules.py.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/page-layout.scm.diff?tr1=1.87&tr2=1.88&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.4150 lilypond/ChangeLog:1.4151
--- lilypond/ChangeLog:1.4150   Mon Oct  3 00:57:17 2005
+++ lilypond/ChangeLog  Mon Oct  3 11:30:40 2005
@@ -1,5 +1,17 @@
 2005-10-03  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
+       * input/regression/alignment-vertical-spacing.ly: new file.
+
+       * python/convertrules.py (conv): add rule.
+
+       * ly/music-functions-init.ly: rename outputProperty to overrideProperty
+
+       * lily/align-interface.cc (stretch_after_break): new
+       function. Read fixed-alignment-extra-space property.
+       (align_elements_to_extents): read alignment-extra-space property.
+
+       * lily/lily-guile.cc (robust_scm2dir): new function.
+
        * scm/page-layout.scm (page-headfoot): annotate headsep and footsep.
        (annotate-space-left): new function. Annotate space left on page. 
        (annotate-y-interval): new function.
Index: lilypond/Documentation/topdocs/NEWS.tely
diff -u lilypond/Documentation/topdocs/NEWS.tely:1.92 
lilypond/Documentation/topdocs/NEWS.tely:1.93
--- lilypond/Documentation/topdocs/NEWS.tely:1.92       Sun Oct  2 14:55:54 2005
+++ lilypond/Documentation/topdocs/NEWS.tely    Mon Oct  3 11:30:40 2005
@@ -45,6 +45,10 @@
 
 
 @itemize @bullet
[EMAIL PROTECTED]  
+Vertical alignments of staves may be tuned for individual systems
+easily.
+
 
 @item 
 Vertical spacing for page layout can now be tuned for each system
@@ -58,7 +62,7 @@
 }
 @end lilypond
 
-This feature was sponsored by Trevor Baca and Nicolas Sceaux.
+This feature was sponsored by Trevor Bača and Nicolas Sceaux.
 
 @item
 The slope of a stem-tremolo may be set manually
@@ -114,7 +118,7 @@
 @end lilypond
 
 This improvement has been sponsored by Bertalan Fodor, Jay Hamilton,
-Kieren MacMillan, Steve Doonan, Trevor Baca, and Vicente Solsona
+Kieren MacMillan, Steve Doonan, Trevor Bača, and Vicente Solsona
 Dell¡.
 
 @item
@@ -130,7 +134,7 @@
 @end lilypond
 
 This improvement has been sponsored by Bertalan Fodor, Jay Hamilton,
-Kieren MacMillan, Steve Doonan, Trevor Baca, and Vicente Solsona
+Kieren MacMillan, Steve Doonan, Trevor Bača, and Vicente Solsona
 Dell¡.
  
 
@@ -176,7 +180,7 @@
 }
 @end lilypond  
 
-This feature was sponsored by Trevor Baca. 
+This feature was sponsored by Trevor Bača. 
 
 @item
 When @code{strict-note-spacing} is set, notes are spaced without regard
@@ -187,7 +191,7 @@
 \new Staff { c8[ c \clef alto c \grace { c16[ c] } c8 c c]  c32[ c32] }
 @end lilypond
 
-This feature was sponsored by Trevor Baca. 
+This feature was sponsored by Trevor Bača. 
 
 @item
 Beams support the @code{break-overshoot} property, for example
@@ -198,7 +202,7 @@
 c2.. c8[ \break c]
 @end lilypond
  
-This feature was sponsored by Trevor Baca. 
+This feature was sponsored by Trevor Bača. 
 
 @item
 Proportional notation is supported.  Notes can be spaced proportional
@@ -213,7 +217,7 @@
 >>
 @end lilypond
 
-This feature was sponsored by Trevor Baca.
+This feature was sponsored by Trevor Bača.
 
 @item 
 Symbol sizes (e.g. accidentals) are disregarded for spacing if
@@ -231,7 +235,7 @@
 >>
 @end lilypond
 
-This feature was sponsored by Trevor Baca.
+This feature was sponsored by Trevor Bača.
  
 @item
 Endings of broken tuplet brackets can be tuned.  For example, you can
@@ -247,7 +251,7 @@
 }
 @end lilypond
 
-This feature was sponsored by Trevor Baca.
+This feature was sponsored by Trevor Bača.
 
 
 @item @textanchor{arrow-glyph}
@@ -262,7 +266,7 @@
 }
 @end lilypond
 
-These glyphs have been sponsored by Trevor Baca.
+These glyphs have been sponsored by Trevor Bača.
 
 
 @item
@@ -276,8 +280,6 @@
 }
 @end lilypond
 
[EMAIL PROTECTED] This feature was sponsored by Trevor Baca.
[EMAIL PROTECTED] where does this fail?
 This feature was sponsored by Trevor Bača.
 
 @item
Index: lilypond/VERSION
diff -u lilypond/VERSION:1.659 lilypond/VERSION:1.660
--- lilypond/VERSION:1.659      Tue Sep 27 11:33:27 2005
+++ lilypond/VERSION    Mon Oct  3 11:30:40 2005
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=7
-PATCH_LEVEL=11
+PATCH_LEVEL=12
 MY_PATCH_LEVEL=
 
Index: lilypond/lily/align-interface.cc
diff -u lilypond/lily/align-interface.cc:1.83 
lilypond/lily/align-interface.cc:1.84
--- lilypond/lily/align-interface.cc:1.83       Mon Oct  3 11:15:55 2005
+++ lilypond/lily/align-interface.cc    Mon Oct  3 11:30:40 2005
@@ -7,7 +7,6 @@
 */
 
 #include "align-interface.hh"
-
 #include "spanner.hh"
 #include "item.hh"
 #include "axis-group-interface.hh"
@@ -15,6 +14,13 @@
 #include "hara-kiri-group-spanner.hh"
 #include "grob-array.hh"
 
+/*
+  TODO: for vertical spacing, should also include a rod & spring
+  scheme of sorts into this: the alignment should default to a certain
+  distance between element refpoints, unless bbox force a bigger
+  distance.
+ */
+
 MAKE_SCHEME_CALLBACK (Align_interface, alignment_callback, 2);
 SCM
 Align_interface::alignment_callback (SCM element_smob, SCM axis)
@@ -68,8 +74,7 @@
 
       Direction stacking_dir = robust_scm2dir (me->get_property 
("stacking-dir"),
                                               DOWN);
-  
-      Real delta  = extra_space / elems.size();
+      Real delta  = extra_space / elems.size() * stacking_dir;
       for (int i = 0; i < elems.size (); i++)
        elems[i]->translate_axis (i * delta, Y_AXIS);
     }
@@ -85,11 +90,8 @@
 {
   me->set_property ("positioning-done", SCM_BOOL_T);
 
-  SCM d = me->get_property ("stacking-dir");
-
-  Direction stacking_dir = scm_is_number (d) ? to_dir (d) : CENTER;
-  if (!stacking_dir)
-    stacking_dir = DOWN;
+  Direction stacking_dir = robust_scm2dir (me->get_property ("stacking-dir"),
+                                          DOWN);
 
   Real dy = robust_scm2double (me->get_property ("forced-distance"), 0.0);
 
@@ -172,11 +174,8 @@
   
   me->set_property ("positioning-done", SCM_BOOL_T);
   
-  SCM d = me->get_property ("stacking-dir");
-
-  Direction stacking_dir = scm_is_number (d) ? to_dir (d) : CENTER;
-  if (!stacking_dir)
-    stacking_dir = DOWN;
+  Direction stacking_dir = robust_scm2dir (me->get_property ("stacking-dir"),
+                                              DOWN);
 
   Interval threshold = robust_scm2interval (me->get_property ("threshold"),
                                            Interval (0, Interval::infinity 
()));
@@ -308,9 +307,16 @@
   return 0;
 }
 
-ADD_INTERFACE (Align_interface, "align-interface",
+ADD_INTERFACE (Align_interface,
+              "align-interface",
+              
               "Order grobs from top to bottom, left to right, right to left or 
bottom "
-              "to top.",
+              "to top.  "
+              "For vertical alignments of staves, the 
@code{break-system-details} of "
+              "the left @internalsref{NonMusicalPaperColumn} may be set to 
tune vertical spacing "
+              "Set @code{alignment-extra-space} to add extra space for staves. 
Set "
+              "@code{fixed-alignment-extra-space} to force staves in 
PianoStaves further apart."
+              ,
               
               /*
                 properties
Index: lilypond/ly/engraver-init.ly
diff -u lilypond/ly/engraver-init.ly:1.251 lilypond/ly/engraver-init.ly:1.252
--- lilypond/ly/engraver-init.ly:1.251  Fri Sep 30 21:38:18 2005
+++ lilypond/ly/engraver-init.ly        Mon Oct  3 11:30:40 2005
@@ -281,6 +281,8 @@
   verticalAlignmentChildCallback = 
#Align_interface::fixed_distance_alignment_callback
   \override VerticalAlignment #'forced-distance = #12
   \override VerticalAlignment #'self-alignment-Y = #0
+  \override VerticalAlignment #'after-line-breaking-callback
+     = #Align_interface::stretch_after_break
 
   \consists "Vertical_align_engraver"
   \consists "Instrument_name_engraver"
Index: lilypond/ly/music-functions-init.ly
diff -u lilypond/ly/music-functions-init.ly:1.39 
lilypond/ly/music-functions-init.ly:1.40
--- lilypond/ly/music-functions-init.ly:1.39    Tue Sep 27 10:01:15 2005
+++ lilypond/ly/music-functions-init.ly Mon Oct  3 11:30:40 2005
@@ -64,7 +64,7 @@
                   'origin location
                   'procedure proc))
 
-outputProperty =
+overrideProperty =
 #(def-music-function (parser location name property value)
    (string? symbol? scheme?)
 
Index: lilypond/python/convertrules.py
diff -u lilypond/python/convertrules.py:1.16 
lilypond/python/convertrules.py:1.17
--- lilypond/python/convertrules.py:1.16        Sat Oct  1 23:06:53 2005
+++ lilypond/python/convertrules.py     Mon Oct  3 11:30:40 2005
@@ -2575,3 +2575,10 @@
 
 conversions.append (((2, 7, 11), conv,
                     '''\"tabloid\" -> \"11x17\"'''))
+
+def conv (str):
+       str = re.sub(r'outputProperty' , 'overrideProperty', str)
+       return str
+
+conversions.append (((2, 7, 12), conv,
+                    '''outputProperty -> overrideProperty'''))
Index: lilypond/scm/page-layout.scm
diff -u lilypond/scm/page-layout.scm:1.87 lilypond/scm/page-layout.scm:1.88
--- lilypond/scm/page-layout.scm:1.87   Mon Oct  3 00:57:19 2005
+++ lilypond/scm/page-layout.scm        Mon Oct  3 11:30:41 2005
@@ -98,7 +98,6 @@
                                    #t)
               #f)))
     
-    (display (list y-extent bottomspace))
     (if arrow
        (set! stencil
              (ly:stencil-add stencil arrow)))
@@ -373,15 +372,15 @@
 
     (map add-system (zip lines offsets))
 
-    
-    (set!
-     page-stencil
-     (annotate-space-left page-stencil layout
-                         (- bottom-edge
-                            (if (ly:stencil? foot)
-                                (interval-length (ly:stencil-extent foot Y))
-                                0))))
-    
+    (if (annotate? layout)
+       (set!
+        page-stencil
+        (annotate-space-left page-stencil layout
+                             (- bottom-edge
+                                (if (ly:stencil? foot)
+                                    (interval-length (ly:stencil-extent foot 
Y))
+                                    0)))
+        ))
 
     
     (if (and (ly:stencil? foot)


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

Reply via email to