]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-markup-commands.scm
Run grand-replace on all sources. Updates (c) ....--2006 lines.
[lilypond.git] / scm / define-markup-commands.scm
index a6773286c6aa7673ca4241dcc0a6b9a3719df222..55a313f3ecf1e423cb7c198b73bb02db17e97c5a 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 2000--2006  Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; (c) 2000--2007  Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;                  Jan Nieuwenhuizen <janneke@gnu.org>
 
 
   (number-pair?)
   "A simple line.  Uses the @code{thickness} property."
   (let*
-      ((th (chain-assoc-get 'thickness props  0.1))
+      ((th (*
+           (ly:output-def-lookup layout 'line-thickness)
+           (chain-assoc-get 'thickness props 1)))
        (x (car dest))
-       (y (cdr dest)))
+       (y (cdr dest))
+       (s (ly:make-stencil
+          `(draw-line
+            ,th
+            0 0
+            ,x ,y)
 
-    (ly:make-stencil
-     `(draw-line
-       ,th
-       0 0
-       ,x ,y)
+          (cons (min x 0) (max x 0))
+          (cons (min y 0) (max y 0)))))
 
-     (cons (min x 0) (min y 0))
-     (cons (max x 0) (max y 0)))))
+    s))
 
 (define-builtin-markup-command (draw-circle layout props radius thickness fill)
   (number? number? boolean?)
@@ -73,7 +76,9 @@ optionally filled."
 @code{circle-padding} and @code{font-size} properties to determine line
 thickness and padding around the markup."
   
-  (let* ((th (chain-assoc-get 'thickness props  0.1))
+  (let* ((th
+         (* (ly:output-def-lookup layout 'line-thickness)
+            (chain-assoc-get 'thickness props  1)))
         (size (chain-assoc-get 'font-size props 0))
         (pad
          (* (magstep size)
@@ -117,7 +122,9 @@ the PDF backend."
 @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))
+  (let* ((th (*
+             (ly:output-def-lookup layout 'line-thickness)
+             (chain-assoc-get 'thickness props  0.1)))
         (size (chain-assoc-get 'font-size props 0))
         (pad (* (magstep size)
                 (chain-assoc-get 'box-padding props 0.2)))
@@ -1100,7 +1107,7 @@ Use the filled head if @var{filled} is specified."
      name)))
 
 (define-builtin-markup-command (musicglyph layout props glyph-name) (string?)
-  "@var{glyph0name} is converted to a musical symbol; for example,
+  "@var{glyph-name} is converted to a musical symbol; for example,
 @code{\\musicglyph #\"accidentals.natural\"} selects the natural sign from
 the music font.  See @usermanref{The Feta font} for a complete listing of
 the possible glyphs."
@@ -1163,7 +1170,8 @@ figured bass notation."
       ((mag (magstep (chain-assoc-get 'font-size props 0)))
        (thickness
        (* mag
-          (chain-assoc-get 'thickness props 0.16)))
+          (ly:output-def-lookup layout 'line-thickness)
+          (chain-assoc-get 'thickness props 1.6)))
        (dy (* mag 0.15))
        (number-stencil (interpret-markup layout
                                         (prepend-alist-chain 'font-encoding 'fetaNumber props)
@@ -1492,7 +1500,7 @@ when @var{label} is not found."
 ;; Markup list commands
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(define (space-lines baseline-skip lines)
+(define-public (space-lines baseline-skip lines)
   (map (lambda (line)
         (stack-lines DOWN 0.0 (/ baseline-skip 2.0)
                      (list (ly:make-stencil "" (cons 0 0) (cons 0 0))