]> git.donarmstrong.com Git - lilypond.git/commitdiff
(assertBeamQuant): use make-simple-closure.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 2 Nov 2005 13:28:30 +0000 (13:28 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 2 Nov 2005 13:28:30 +0000 (13:28 +0000)
ChangeLog
Documentation/topdocs/NEWS.tely
ly/spanners-init.ly

index 25a8e1d623ef5652874919e34a1cc3a0520dcb99..dca5cf32e4257a37707968cb40fa908ad609702b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-11-02  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * ly/spanners-init.ly (assertBeamQuant): use make-simple-closure.
+
 2005-11-02  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * lily/main.cc (setup_paths)[__MINGW32__]: Do not assume argv0 is
@@ -9,7 +13,9 @@
 
 2005-11-02  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
-       * scm/define-grobs.scm: purge self-[XY]-offset varialbes, replace
+       * Documentation/topdocs/NEWS.tely (Top): document new backend design.
+
+       * scm/define-grobs.scm: purge self-[XY]-offset variables, replace
        with simple-closure.
 
        * lily/self-aligment-interface.cc (set_align_self): new function
index 705a4f551c6250523a8aecd41b3aff4edb97510d..5b5257d0bfb59fc08647374eeead28869a2382df 100644 (file)
@@ -46,6 +46,41 @@ This document is also available in @uref{NEWS.pdf,PDF}.
 
 @itemize @bullet
 
+@item
+Each grob property may also be a ``grob closure.'' This means that it
+is possible to combine functions. For example, the @code{Y-offset} of
+a @code{InstrumentName} grob is defined to be 
+
+@verbatim
+,(ly:make-simple-closure
+  `(,+
+    ,(ly:make-simple-closure (list Self_alignment_interface::y_aligned_on_self))
+    ,(ly:make-simple-closure (list Side_position_interface::y_aligned_on_support_refpoints)))
+@end verbatim
+
+@noindent
+During execution, the @code{Y-offset} of an @code{InstrumentName} is computed
+as
+
+@example
+(+ (Self_alignment_interface::y_aligned_on_self @var{grob})
+   (Self_alignment_interface::y_aligned_on_support_refpoints @var{grob}))
+@end example
+
+
+@item
+Calculation of extent and offset of grob is now controlled via the
+@code{X-extent}, @code{Y-extent}, @code{X-offset} and @code{Y-offset}
+properties, for example
+
+@verbatim
+\override TextScript #'Y-offset = #-6
+@end verbatim
+
+@noindent
+hard codes @code{TextScript} grobs to be 6 spaces below their Y-parent
+grobs.
+
 @item
 Each grob property can be a procedure. If this is the case, it is
 assumed to be a routine that calculates said property.  This is a
index 56d0272bd512bf0cff213095119dd8a1a783fee6..59765d075e7cdd40589e1da782c1fec006889ca2 100644 (file)
@@ -97,12 +97,20 @@ sostenutoUp = #(make-span-event 'SostenutoEvent STOP)
 assertBeamQuant =
 #(def-music-function (parser location l r) (pair? pair?)
   (make-grob-property-override 'Beam 'positions
-   (apply ly:make-callback-chain (check-quant-callbacks l r))))
+   (ly:make-simple-closure
+    (ly:make-simple-closure
+     (append
+      (list chain-grob-member-functions `(,cons 0 0))
+      (check-quant-callbacks l r))))))
     
 % for regression testing purposes.
 assertBeamSlope =
 #(def-music-function (parser location comp) (procedure?)
   (make-grob-property-override 'Beam 'positions
-   (apply ly:make-callback-chain (check-slope-callbacks comp))))
-
+   (ly:make-simple-closure
+    (ly:make-simple-closure
+     (append
+      (list chain-grob-member-functions `(,cons 0 0))
+      (check-slope-callbacks comp))))))
+