X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fstencil.scm;h=fb2809e9fd2fee40c1d98660f7f10ac5ccf4711d;hb=34cc8063c5cb355e975ba7a54b89ef04f6250f2e;hp=e64cc2b91c8662fad2736fd71d5fc56bb5a0ca48;hpb=c5c06029fc0b17266d36b40255c631ac1d31a370;p=lilypond.git diff --git a/scm/stencil.scm b/scm/stencil.scm index e64cc2b91c..fb2809e9fd 100644 --- a/scm/stencil.scm +++ b/scm/stencil.scm @@ -159,7 +159,7 @@ the more angular the shape of the parenthesis." upper-end-point ;; Step 1: move to lower end point. lower-end-point) - (* 2 half-thickness) + (min (* 2 half-thickness) line-width) (interval-widen x-extent (/ line-width 2)) (interval-widen y-extent (/ line-width 2))))) @@ -737,15 +737,17 @@ we make between 0 and 2*pi." `(delay-stencil-evaluation ,(delay whiteout-expr))) stil))))) -(define-public (stencil-whiteout-box stencil) +(define*-public (stencil-whiteout-box stencil + #:optional (thickness 0) (blot 0) (color white)) + "@var{thickness} is how far in staff-spaces the white outline +extends past the extents of @var{stencil}." (let* - ((x-ext (ly:stencil-extent stencil X)) - (y-ext (ly:stencil-extent stencil Y))) + ((x-ext (interval-widen (ly:stencil-extent stencil X) thickness)) + (y-ext (interval-widen (ly:stencil-extent stencil Y) thickness))) - (ly:stencil-add - (stencil-with-color (ly:round-filled-box x-ext y-ext 0.0) - white) - stencil))) + (ly:stencil-add + (stencil-with-color (ly:round-filled-box x-ext y-ext blot) color) + stencil))) (define-public (arrow-stencil-maker start? end?) "Return a function drawing a line from current point to @code{destination},