X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fpage.scm;h=20e58b61e21c4bf0bcdac8a61318a15cebace630;hb=HEAD;hp=f6bb29d701be0c331fadf51fe6b4410a570de06d;hpb=25ca54b640c067e2286a1d7ba47f24a1b4dc070e;p=lilypond.git diff --git a/scm/page.scm b/scm/page.scm index f6bb29d701..20e58b61e2 100644 --- a/scm/page.scm +++ b/scm/page.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2006--2012 Han-Wen Nienhuys +;;;; Copyright (C) 2006--2015 Han-Wen Nienhuys ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -82,16 +82,12 @@ (define (page-translate-systems page) (for-each - (lambda (sys-off) - (let* - ((sys (car sys-off)) - (off (cadr sys-off))) + (lambda (sys off) + (if (not (number? (ly:prob-property sys 'Y-offset))) + (ly:prob-set-property! sys 'Y-offset off))) - (if (not (number? (ly:prob-property sys 'Y-offset))) - (ly:prob-set-property! sys 'Y-offset off)))) - - (zip (page-property page 'lines) - (page-property page 'configuration)))) + (page-property page 'lines) + (page-property page 'configuration))) (define (annotate-top-space first-system layout header-stencil stencil) (let* ((top-margin (ly:output-def-lookup layout 'top-margin)) @@ -106,6 +102,7 @@ (ly:stencil-add stencil (ly:stencil-translate-axis (annotate-spacing-spec layout + (symbol->string sym) spacing-spec (- top-margin) (car header-extent) @@ -230,7 +227,7 @@ system-separator-markup) #f)) - (page-stencil (ly:make-stencil '())) + (page-stencil empty-stencil) (last-system #f) (last-y 0.0) @@ -246,12 +243,14 @@ (add-system (lambda (system) (let* ((stencil (paper-system-stencil system)) - (y (ly:prob-property system 'Y-offset 0)) + (extra-offset (ly:prob-property system 'extra-offset '(0 . 0))) + (x (+ (ly:prob-property system 'X-offset 0.0) + (car extra-offset))) + (y (+ (ly:prob-property system 'Y-offset 0.0) + (cdr extra-offset))) (is-title (paper-system-title? system))) - (add-to-page stencil - (ly:prob-property system 'X-offset 0.0) - y) + (add-to-page stencil x y) (if (and (ly:stencil? system-separator-stencil) last-system (not (paper-system-title? system))