Add pad-y markup command
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 20 Nov 2012 21:55:38 +0000 (20 22:55 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 20 Nov 2012 21:55:38 +0000 (20 22:55 +0100)
orchestrallily.ily

index 37194ec..154df4f 100644 (file)
@@ -1238,6 +1238,14 @@ addArticulation = #(define-music-function (parser location type music)
                 (add-articulation music type))
 
 
+#(define-markup-command (pad-y layout props amount arg)
+  (number? markup?)
+  #:category align
+  (let* ((m (interpret-markup layout props arg))
+         (x (ly:stencil-extent m X))
+         (y (ly:stencil-extent m Y)))
+    (ly:make-stencil (ly:stencil-expr m) x 
+                    (interval-widen y amount))))
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%