]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/stencil.scm
Merge branch 'master' of git://git.sv.gnu.org/lilypond
[lilypond.git] / scm / stencil.scm
index db35a5ecc54af4228b43c2bcb2b5b72ef8f86603..e4c15978b4fb6288b589a96f5648a8fa9a42637d 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 2003--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; (c) 2003--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 (define-public (stack-stencils axis dir padding stils)
   "Stack stencils STILS in direction AXIS, DIR, using PADDING."
@@ -279,7 +279,9 @@ encloses the contents.
                      (- (list-ref bbox 2) (list-ref bbox 0))
                      (- (list-ref bbox 3) (list-ref bbox 1))
                      ))
-       (factor (exact->inexact (/ size bbox-size)))
+       (factor (if (< 0 bbox-size)
+                  (exact->inexact (/ size bbox-size))
+                  0))
        (scaled-bbox
        (map (lambda (x) (* factor x)) bbox))
        (clip-rect-string (ly:format