From bad0e5f6c8a3e5a40284e4120cb9753b77a8d7b3 Mon Sep 17 00:00:00 2001 From: Keith OHara Date: Wed, 21 Nov 2012 13:52:53 -0800 Subject: [PATCH] markup.scm: use stencil extents when stacking; issue 723 --- input/regression/markup-center-align-nocollision.ly | 6 +----- scm/markup.scm | 5 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/input/regression/markup-center-align-nocollision.ly b/input/regression/markup-center-align-nocollision.ly index bb13a4cadb..c161af8cc6 100644 --- a/input/regression/markup-center-align-nocollision.ly +++ b/input/regression/markup-center-align-nocollision.ly @@ -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} } diff --git a/scm/markup.scm b/scm/markup.scm index 31bbaeeb42..a4f723e04c 100644 --- a/scm/markup.scm +++ b/scm/markup.scm @@ -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)) -- 2.39.2