]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/layout-page-layout.scm
Merge branch 'master' of ssh+git://gpercival@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / scm / layout-page-layout.scm
index c5721b325a98711b2d89c4ff7195705ea89e50fd..02583858e49015e5f027167df5ebe62315d4cc98 100644 (file)
@@ -15,6 +15,7 @@
   #:use-module (lily)
   #:export (post-process-pages optimal-page-breaks make-page-from-systems
            page-breaking-wrapper
+           stretchable-line? ; delete me
            ;; utilities for writing custom page breaking functions
             line-height line-next-space line-next-padding
            line-minimum-distance line-ideal-distance
             line-minimum-position-on-page
            page-maximum-space-to-fill page-maximum-space-left space-systems))
 
+; this is for 2-pass spacing. Delete me.
+(define (stretchable-line? line)
+  "Say whether a system can be stretched."
+  (not (or (ly:prob-property? line 'is-title)
+          (let ((system-extent (paper-system-staff-extents line)))
+            (= (interval-start system-extent)
+               (interval-end   system-extent))))))
+
 (define (stretch-and-draw-page paper-book systems page-number ragged last)
+  (define (max-stretch sys)
+    (if (ly:grob? sys)
+       (ly:grob-property sys 'max-stretch)
+       0.0))
+
   (define (stretchable? sys)
     (and (ly:grob? sys)
-        (ly:grob-property sys 'stretchable)))
+        (> (max-stretch sys) 0.0)))
 
   (define (height-estimate sys)
     (interval-length
         (ly:grob-property sys 'pure-Y-extent)
         (paper-system-extent sys Y))))
 
-  (define (max-stretch sys)
-    (if (stretchable? sys)
-       (ly:grob-property sys 'max-stretch)
-       0.0))
-
   (define (print-system sys)
     (if (ly:grob? sys)
        (ly:system-print sys)