]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: Extending addition about calling stencil func
authorJames Lowe <pkx166h@gmail.com>
Tue, 24 Dec 2013 06:32:16 +0000 (06:32 +0000)
committerJames Lowe <pkx166h@gmail.com>
Tue, 31 Dec 2013 07:09:23 +0000 (07:09 +0000)
Issue 3669

Came out of:
http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00587.html

Text based on Keith OHara's suggestions

Indicate that it is possible to call the stencil function in a user's
own override of the stencil property

Documentation/extending/programming-interface.itely

index 6b16fdafbc64bb34bb4bfa580ebdfe5b98561f48..945a44aefe12fa3ed930d6b5a95d3174b07819b1 100644 (file)
@@ -1251,6 +1251,19 @@ Properties that typically use callbacks include
 
 The procedure always takes a single argument, being the grob.
 
+That procedure may access the usual value of the property, by first
+calling the function that is the usual callback for that property, which
+can by found in the Internals Reference or the file 'define-grobs.scm':
+
+@example
+\relative c'' @{
+  \override Flag #'X-offset = #(lambda (flag)
+    (let ((default (ly:flag::calc-x-offset flag)))
+      (* default 4.0)))
+  c4. d8 a4. g8
+@}
+@end example
+
 If routines with multiple arguments must be called, the current grob
 can be inserted with a grob closure.  Here is a setting from
 @code{AccidentalSuggestion},