]> git.donarmstrong.com Git - lilypond.git/commitdiff
markup.scm: use stencil extents when stacking; issue 723
authorKeith OHara <k-ohara5a5a@oco.net>
Wed, 21 Nov 2012 21:52:53 +0000 (13:52 -0800)
committerKeith OHara <k-ohara5a5a@oco.net>
Thu, 13 Dec 2012 04:23:40 +0000 (20:23 -0800)
input/regression/markup-center-align-nocollision.ly
scm/markup.scm

index bb13a4cadb9ddbb1cc5572cb13db3ff8b07538d5..c161af8cc6a2f676620a98bf2bc735f5c12c5511 100644 (file)
@@ -1,14 +1,10 @@
 \version "2.16.0"
 
 \header {
-  texidoc = "Text markup using @code{center-align} or @code{center-column} shall
+  texidoc = "Text markup using @code{center-column} shall
 still reserve space for its whole width and not overwrite the previous stencil."
 }
 
-\markup{\left-align { AAA BB }}
-\markup{\center-align { AAA BB }}
-\markup{\right-align { AAA BB }}
-
 % Here the two center-columns should not collide with the +
 \markup \line {
   \center-column { \line {XXX} \line {Y} }
index 31bbaeeb420bb2d76373fb7d3a0551e40e9739eb..a4f723e04c1d6f1162ee881b58f7af0f9acfa3d3 100644 (file)
@@ -62,7 +62,8 @@ Example:
   (cons (acons key val (car chain)) (cdr chain)))
 
 (define-public (stack-stencil-line space stencils)
-  "DOCME"
+  "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)))
 
@@ -70,7 +71,7 @@ Example:
                (ly:stencil? (cadr stencils)))
           (let* ((tail (stack-stencil-line space (cdr stencils)))
                  (head (car stencils))
-                 (xoff (+ space (interval-length (ly:stencil-extent head X)))))
+                 (xoff (+ space (interval-end (ly:stencil-extent head X)))))
             (ly:stencil-add head
                             (ly:stencil-translate-axis tail xoff X)))
           (car stencils))