]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/paper-system.scm
make web fixes
[lilypond.git] / scm / paper-system.scm
index 43711a4ee1c94ea7536c4910281b766842ff60c6..55e48ebed8dd402a2ad29b5a7388753667c33b8e 100644 (file)
 (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))
 
                                        (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
                                 (+ next-space next-padding)
                                 "refpoint-Y-extent" "next-space+padding"
                                 "space after next-space+padding"))
-    (set! (ly:prob-property system 'stencil)
-         (ly:stencil-add
-          (ly:prob-property system 'stencil)
-          (ly:make-stencil
-           (ly:stencil-expr annotations)
-           (ly:stencil-extent empty-stencil X)
-           (ly:stencil-extent empty-stencil Y))))))
+    (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
+              (ly:prob-property system 'stencil)
+              (ly:make-stencil
+               (ly:stencil-expr annotations)
+               (ly:stencil-extent empty-stencil X)
+               (ly:stencil-extent empty-stencil Y)))))
+    (ly:prob-property system 'stencil)))