From: nsceaux Date: Tue, 28 Feb 2006 18:42:27 +0000 (+0000) Subject: * scm/layout-page-layout.scm (write-page-breaks): add a X-Git-Tag: release/2.7.38^2~36 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=63d706034b48ab15a2791b7b4819bd763112fa3f;p=lilypond.git * scm/layout-page-layout.scm (write-page-breaks): add a music-system-heights property to the page layout output. * scm/page.scm (make-page-stencil): take footer into account when computing the 'space-left page property (annotate-space-left): take footer into account when annonating space left. --- diff --git a/ChangeLog b/ChangeLog index 667f88bb36..d527dd4fb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-02-28 Nicolas Sceaux + + * scm/layout-page-layout.scm (write-page-breaks): add a + music-system-heights property to the page layout output. + + * scm/page.scm (make-page-stencil): take footer into account when + computing the 'space-left page property + (annotate-space-left): take footer into account when annonating + space left. + 2006-02-28 Graham Percival * Documentation/user/ advanced-notation, global: more (final) diff --git a/scm/layout-page-layout.scm b/scm/layout-page-layout.scm index 8370ea8a40..a0a35027a3 100644 --- a/scm/layout-page-layout.scm +++ b/scm/layout-page-layout.scm @@ -106,6 +106,12 @@ (define (handle-page page) (define index 0) + (define music-system-heights + (map-in-order (lambda (sys) + (* -1 (car (paper-system-extent sys Y)))) + (remove (lambda (sys) + (ly:prob-property? sys 'is-title)) + (page-lines page)))) (define (handle-system sys) (let* ((props `((line-break . #t) @@ -113,6 +119,7 @@ . ((system-Y-extent . ,(paper-system-extent sys Y)) (system-refpoint-Y-extent . ,(paper-system-staff-extents sys)) (system-index . ,index) + (music-system-heights . ,music-system-heights) (page-system-count . ,(length (page-lines page))) (page-printable-height . ,(page-printable-height page)) (page-space-left . ,(page-property page 'space-left)))) diff --git a/scm/page.scm b/scm/page.scm index 616efe3469..041edd3a72 100644 --- a/scm/page.scm +++ b/scm/page.scm @@ -124,7 +124,13 @@ (layout (ly:paper-book-paper p-book)) (arrow (annotate-y-interval layout "space left" - (cons (- (page-property page 'bottom-edge)) + (cons (- 0.0 + (page-property page 'bottom-edge) + (let ((foot (page-property page 'foot-stencil))) + (if (and (ly:stencil? foot) + (not (ly:stencil-empty? foot))) + (car (ly:stencil-extent foot Y)) + 0.0))) (page-property page 'bottom-system-edge)) #t))) @@ -336,7 +342,12 @@ create offsets. (ly:prob-set-property! page 'bottom-system-edge (car (ly:stencil-extent page-stencil Y))) (ly:prob-set-property! page 'space-left - (car (ly:stencil-extent page-stencil Y))) + (+ (prop 'bottom-edge) + (prop 'bottom-system-edge) + (if (and (ly:stencil? foot) + (not (ly:stencil-empty? foot))) + (car (ly:stencil-extent foot Y)) + 0.0))) (if (annotate? layout) (set! page-stencil