|
|
GNU LilyPondWelcome to the home of the GNU Music Typesetter |
||||||||||
|
Node:Callbacks, Next:Setting grob properties, Previous:What is a grob?, Up:Grobs CallbacksOffsets of grobs are relative to a parent reference point. Most positions are not known when an object is created, so these are calculated as needed. This is done by adding a callback for a specific direction. Suppose you have the following code in a .ly file.
#(define (my-callback gr axis)
(* 2.0 (get-grob-property gr 'direction))
)
....
\property Voice.Stem \override #'Y-offset-callbacks = #(list
my-callback)
When the Y-offset of a Stem object is needed, LilyPond will
automatically execute all callbacks for that object. In this case, it
will find (note: Offset callbacks can be stacked, i.e.
\property .... \override #'Y-offset-callbacks = #(list
callback1 callback2 callback3)
The callbacks will be executed in the order Similarly, the size of a grob are determined through callbacks, settable
with grob properties |
||||||||||
|
Go back to index of LilyPond.
Please send GNU LilyPond questions and comments to lilypond-user@gnu.org. Please send comments on these web pages to lilypond@packages.debian.org Copyright (c) 1997--2001 Han-Wen Nienhuys and Jan Nieuwenhuizen. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. |
|||||||||||
This page was built from LilyPond-1.4.12 (stable-branch) by