|
|
GNU LilyPondWelcome to the home of the GNU Music Typesetter |
||||||||||
|
Node:Setting grob properties, Next:Grob interfaces, Previous:Callbacks, Up:Grobs Setting grob propertiesGrob properties are stored as GUILE association lists, with symbols as
keys. In GUILE you can access these using functions described in
Section Grob Scheme functions. From C++, grob properties can be
accessed using these functions:
SCM get_grob_property (SCM) const; void set_grob_property (const char * , SCM val); void set_immutable_grob_property (const char * , SCM val); void set_immutable_grob_property (SCM key, SCM val); void set_grob_property (SCM , SCM val); void set_grob_pointer (const char*, SCM val); SCM remove_grob_property (const char* nm); All lookup functions identify undefined properties with end-of-list
(i.e. Properties are stored in two ways:
You can change immutable grob properties with the \override syntax:
\property Voice.Stem \override #'direction = #1 This will push the entry \property Voice.stem \revert #'direction There is also a shorthand,
\property Context.GrobType \set #'prop = #VAL this does a You can change mutable properties with \outputproperty. This construct
looks like
\context ContextName \outputproperty pred #sym = #val In this case, in every grob that satisfies pred, the grob property
sym is set to val. For example
\outputproperty
#(lambda (gr) (string? (ly-get-grob-property gr
'text)))
#'extra-offset = #'(-1.0 . 0.0)
This shifts all grobs that have a |
||||||||||
|
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