+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; general
+
+(define-public (make-stencil-boxer thickness padding callback)
+
+ "Return function that adds a box around the grob passed as argument."
+ (lambda (grob)
+
+ (box-stencil (callback grob) thickness padding)))
+
+(define-public (make-stencil-circler thickness padding callback)
+ "Return function that adds a circle around the grob passed as argument."
+
+ (lambda (grob) (circle-stencil (callback grob) thickness padding)))
+
+(define-public (print-circled-text-callback grob)
+ (let* ((text (ly:grob-property grob 'text))
+
+ (layout (ly:grob-layout grob))
+ (defs (ly:output-def-lookup layout 'text-font-defaults))
+ (props (ly:grob-alist-chain grob defs))
+ (circle (ly:text-interface::interpret-markup
+ layout props (make-circle-markup text))))
+ circle))
+
+