X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fpaper-system.scm;h=6a391a3a0f41099739022ab74027e33b287e8f66;hb=e02128cb6438dea6616c1216e3cb1af636e8c270;hp=2f22865b4830fed7e6a7b2c06611d27da78f3ad6;hpb=e6e2c951c43f212538badec0c4e053d31feea3c8;p=lilypond.git diff --git a/scm/paper-system.scm b/scm/paper-system.scm index 2f22865b48..6a391a3a0f 100644 --- a/scm/paper-system.scm +++ b/scm/paper-system.scm @@ -17,6 +17,14 @@ (define-public (paper-system-stencil system) (ly:prob-property system 'stencil)) +(define-public (paper-system-layout system) + (let* + ((g (paper-system-system-grob system))) + + (if (ly:grob? g) + (ly:grob-layout g) + #f))) + (define-public (paper-system-system-grob paper-system) (ly:prob-property paper-system 'system-grob)) @@ -24,7 +32,7 @@ (ly:stencil-extent (paper-system-stencil system) axis)) (define-public (paper-system-staff-extents ps) - (ly:prob-property ps 'refpoint-Y-extent '(0 . 0))) + (ly:prob-property ps 'staff-refpoint-extent '(0 . 0))) (define-public (paper-system-annotate-last system layout) (let* @@ -103,7 +111,15 @@ (list annotations (ly:make-stencil '() (cons 0 1) (cons 0 0)) (apply ly:stencil-add - extent-annotations))))))))) + extent-annotations)))))))) + + (grob (ly:prob-property system 'system-grob)) + (estimate-extent (if (ly:grob? grob) + (annotate-y-interval layout + "extent-estimate" + (ly:grob-property grob 'pure-Y-extent) + #f) + #f))) (let ((next-space (ly:prob-property system 'next-space (cond ((and next-system @@ -126,8 +142,14 @@ "Y-extent" "next-padding" "space after next-padding") (annotate-extent-and-space paper-system-staff-extents (+ next-space next-padding) - "refpoint-Y-extent" "next-space+padding" + "staff-refpoint-extent" "next-space+padding" "space after next-space+padding")) + (if estimate-extent + (set! annotations + (stack-stencils X RIGHT 0.5 + (list annotations + estimate-extent)))) + (if (not (null? annotations)) (set! (ly:prob-property system 'stencil) (ly:stencil-add @@ -136,4 +158,4 @@ (ly:stencil-expr annotations) (ly:stencil-extent empty-stencil X) (ly:stencil-extent empty-stencil Y))))) - (ly:prob-property system 'stencil))) \ No newline at end of file + (ly:prob-property system 'stencil)))