]> git.donarmstrong.com Git - lilypond.git/commitdiff
implement stack-stencil-line in terms of stack-stencils
authorDavid Kastrup <dak@gnu.org>
Sat, 27 Apr 2013 12:59:48 +0000 (14:59 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 26 May 2013 00:33:03 +0000 (02:33 +0200)
scm/markup.scm

index 9253c378db998950de8cb4bdb3ee1a56f36575ee..45652c0a5c8c1a63b67ea4b0ca6b944c2dd747e9 100644 (file)
@@ -63,21 +63,11 @@ Example:
   (cons (acons key val (car chain)) (cdr chain)))
 
 (define-public (stack-stencil-line space stencils)
-  "Adjoin a list of STENCILS along the X axis, leaving SPACE between the
-   end of each stencil and the reference point of the following stencil."
-  (if (and (pair? stencils)
-           (ly:stencil? (car stencils)))
-
-      (if (and (pair? (cdr stencils))
-               (ly:stencil? (cadr stencils)))
-          (let* ((tail (stack-stencil-line space (cdr stencils)))
-                 (head (car stencils))
-                 (xoff (+ space (interval-end (ly:stencil-extent head X)))))
-            (ly:stencil-add head
-                            (ly:stencil-translate-axis tail xoff X)))
-          (car stencils))
-      (ly:make-stencil '() '(0 . 0) '(0 . 0))))
-
+  "Adjoin a list of @var{stencils} along the X axis, leaving
+@var{space} between the end of each stencil and the beginning of the
+following stencil.  Stencils with empty Y extent are not given
+@var{space} before them and don't avoid overlapping other stencils."
+  (stack-stencils X RIGHT space (filter ly:stencil? stencils)))
 
 ;;; convert a full markup object to an approximate pure string representation