;;;;
;;;; source file of the GNU LilyPond music typesetter
;;;;
-;;;; (c) 2000--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; (c) 2000--2006 Han-Wen Nienhuys <hanwen@cs.uu.nl>
;;;; Jan Nieuwenhuizen <janneke@gnu.org>
"Draw a box round @var{arg}. Looks at @code{thickness},
@code{box-padding} and @code{font-size} properties to determine line
thickness and padding around the markup."
+
(let* ((th (chain-assoc-get 'thickness props 0.1))
(size (chain-assoc-get 'font-size props 0))
(pad (* (magstep size)
(text-dir (chain-assoc-get 'text-direction props RIGHT))
)
-
(if (= text-dir LEFT)
(set! stencils (reverse stencils)))
(ly:make-stencil '() '(1 . -1) '(1 . -1)))))
(def-markup-command (justify-field layout props symbol) (symbol?)
- (let* ((m (chain-assoc-get symbol props)))
+- (let* ((m (chain-assoc-get symbol props)))
(if (string? m)
(interpret-markup layout props
(list justify-string-markup m))
x y)))
+(def-markup-command (pad-to-box layout props x-ext y-ext arg) (number-pair? number-pair? markup?)
+ "Make @var{arg} take at least @var{x-ext}, @var{y-ext} space"
+
+ (let*
+ ((m (interpret-markup layout props arg))
+ (x (ly:stencil-extent m X))
+ (y (ly:stencil-extent m Y)))
+
+
+ (ly:make-stencil (ly:stencil-expr m)
+ (interval-union x-ext x)
+ (interval-union y-ext y))))
+
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; property
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def-markup-command (lower layout props amount arg) (number? markup?)
"
Lower @var{arg}, by the distance @var{amount}.
-A negative @var{amount} indicates raising, see also @code{\raise}.
+A negative @var{amount} indicates raising, see also @code{\\raise}.
"
(ly:stencil-translate-axis (interpret-markup layout props arg)
(- amount) Y))
(def-markup-command (bracketed-y-column layout props indices args)
(list? markup-list?)
"Make a column of the markups in @var{args}, putting brackets around
-the elements marked in @var{indices}, which is a list of numbers."
+the elements marked in @var{indices}, which is a list of numbers.
+
+"
+;;
+;; DROPME? This command is a relic from the old figured bass implementation.
+;;
+
(define (sublist lst start stop)
(take (drop lst start) (- (1+ stop) start)))