(cons (+ (- half) (car yext))
(+ half (cdr yext))))))
-
(def-markup-command (box layout props arg) (markup?)
"Draw a box round @var{arg}. Looks at @code{thickness},
@code{box-padding} and @code{font-size} properties to determine line
(m (interpret-markup layout props arg)))
(box-stencil m th pad)))
-
-
(def-markup-command (filled-box layout props xext yext blot)
(number-pair? number-pair? number?)
"Draw a box with rounded corners of dimensions @var{xext} and @var{yext}."
(ly:stencil-add white stil)))
+(def-markup-command (pad-markup layout props padding arg) (number? markup?)
+ "Add space around a markup object."
+
+ (let*
+ ((stil (interpret-markup layout props arg))
+ (xext (ly:stencil-extent stil X))
+ (yext (ly:stencil-extent stil Y)))
+
+ (ly:make-stencil
+ (ly:stencil-expr stil)
+ (interval-widen xext padding)
+ (interval-widen yext padding))))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; space
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
"Stencil as markup"
stil)
-
(define bbox-regexp
(make-regexp "%%BoundingBox: ([0-9-]+) ([0-9-]+) ([0-9-]+) ([0-9-]+)"))