So in my impression, rounded-box-stencil might deserve a refactoring
anyway?
I would propose:
lukas@Aquarium:~/git/lilypond/scm(dev/lfm/rounded-box)$ git diff master
diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm
index cb99a960fe..8b54fd048a 100644
--- a/scm/define-markup-commands.scm
+++ b/scm/define-markup-commands.scm
@@ -960,8 +960,7 @@ c,8. c16 c4 r
thickness))
(pad (* (magstep font-size) box-padding))
(m (interpret-markup layout props arg)))
- (ly:stencil-add (rounded-box-stencil m th pad corner-radius)
- m)))
+ (rounded-box-stencil m th pad corner-radius)))
(define-markup-command (rotate layout props ang arg)
(number? markup?)
diff --git a/scm/stencil.scm b/scm/stencil.scm
index 0409242a05..e1df561fa6 100644
--- a/scm/stencil.scm
+++ b/scm/stencil.scm
@@ -708,12 +708,11 @@ producing a new stencil."
(interval-widen xext ideal-thickness)
(interval-widen yext ideal-thickness)
ideal-blot))
- (inner (ly:make-stencil (ly:stencil-in-color
- (ly:round-filled-box
- xext yext (- ideal-blot
ideal-thickness))
- "white"))))
- (set! stencil (ly:stencil-add outer inner))
- stencil))
+ (inner (ly:stencil-in-color
+ (ly:round-filled-box
+ xext yext (- ideal-blot ideal-thickness))
+ "white")))
+ (ly:stencil-add outer inner stencil)))
(define-public (flip-stencil axis stil)
"Flip stencil @var{stil} in the direction of @var{axis}.
Lukas