]> 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)
committerDavid Kastrup <dak@gnu.org>
Fri, 14 Mar 2014 17:42:26 +0000 (18:42 +0100)
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

(cherry picked from commit b5e0e268262c7bde54dc22564ec97e8797d558c4)

Documentation/extending/programming-interface.itely

index 82ef216ad844ee74fb85555703c527c9424992d9..e580f29b63878b555603d9ac128a1540a8c1189f 100644 (file)
@@ -1257,6 +1257,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},