From 41c8bf63a7cc180746eace9b9e5278f541be0229 Mon Sep 17 00:00:00 2001 From: James Lowe Date: Tue, 24 Dec 2013 06:32:16 +0000 Subject: [PATCH] Doc: Extending addition about calling stencil func 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/extending/programming-interface.itely b/Documentation/extending/programming-interface.itely index 82ef216ad8..e580f29b63 100644 --- a/Documentation/extending/programming-interface.itely +++ b/Documentation/extending/programming-interface.itely @@ -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}, -- 2.39.2