]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/paper-system.scm
Thinko to 6c323bc: update smart-autogen.sh
[lilypond.git] / scm / paper-system.scm
index d60836199db4622ddcf9b55f182767066fc11028..5a368dbe623b6bc772a623841ee88d4b4c91ae77 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2006--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; Copyright (C) 2006--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
   (equal? #t (ly:prob-property system 'is-title)
          ))
 
+(define (system-stencil system-grob main-stencil)
+  (let* ((padding (ly:grob-property system-grob 'in-note-padding #f))
+         (in-notes (if padding (ly:grob-property system-grob 'in-note-stencil) empty-stencil))
+         (in-notes (if in-notes in-notes empty-stencil))
+         (direction (if padding (ly:grob-property system-grob 'in-note-direction) UP)))
+    (if padding
+       (ly:stencil-combine-at-edge main-stencil Y direction in-notes padding)
+       main-stencil)))
+
 (define-public (paper-system-stencil system)
-  (ly:prob-property system 'stencil))
+  (let ((main-stencil (ly:prob-property system 'stencil))
+        (system-grob (ly:prob-property system 'system-grob)))
+    (if (ly:grob? system-grob)
+        (system-stencil system-grob main-stencil)
+        main-stencil)))
 
 (define-public (paper-system-layout system)
   (let*