]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-lib.scm
Tempo and Rehearsal marks horizontal positioning; issue 3279
[lilypond.git] / scm / output-lib.scm
index 1d094172df7cfb17336ec3eae0e74830a63fab3c..caa7032c70b9a5879f3a4adb05f899d1b3196b9a 100644 (file)
@@ -26,9 +26,6 @@
 (define-public (grob::is-live? grob)
   (pair? (ly:grob-basic-properties grob)))
 
-(define-public (grob::x-parent-width grob)
-  (ly:grob-property (ly:grob-parent grob X) 'X-extent))
-
 (define-public (make-stencil-boxer thickness padding callback)
   "Return function that adds a box around the grob passed as argument."
   (lambda (grob)
@@ -857,6 +854,14 @@ and duration-log @var{log}."
    the previous calculated offset value."
   prev-offset)
 
+(define-public (outside-staff::pure-Y-offset grob start end)
+  "Initial vertical placement of items such as tempo and
+   rehearsal marks, for use in note-spacing."
+   (* (+ (ly:staff-symbol-staff-radius grob)
+         (ly:grob-property grob 'outside-staff-padding 0.0)
+         1.0)
+      (ly:grob-property grob 'direction CENTER)))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;