]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-markup-commands.scm
* The grand 2005-2006 replace.
[lilypond.git] / scm / define-markup-commands.scm
index 2eeb3fae06169717a66c48247d689b3199e5bd5d..a733584112c8904e503bc84999db1e3f6a67a566 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  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>
 
 
@@ -97,6 +97,7 @@ the PDF backend."
   "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)
@@ -391,7 +392,6 @@ determines the space between each markup in @var{args}."
        (text-dir (chain-assoc-get 'text-direction props RIGHT)) 
        )
 
-    
     (if (= text-dir LEFT)
        (set! stencils (reverse stencils)))
     
@@ -559,7 +559,7 @@ linewidth, where X is the number of staff spaces."
       (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))
@@ -687,6 +687,21 @@ alignment accordingly."
                     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
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1129,7 +1144,7 @@ a shortened down stem."
 (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))
@@ -1259,7 +1274,13 @@ that.
 (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)))