]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/harp-pedals.scm
Documents make-partial-ellipse-stencil (issue 3252)
[lilypond.git] / scm / harp-pedals.scm
index fa4ba7e77f5613ee9dac60f09cfae45b49e0bb25..ce756ddfe22a34a69bc58524092f8a0314712dcb 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2008--2009 Reinhold Kainhofer <reinhold@kainhofer.com>
+;;;; Copyright (C) 2008--2012 Reinhold Kainhofer <reinhold@kainhofer.com>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
 
 
 
-(define-builtin-markup-command (harp-pedal layout props definition-string) (string?)
-  instrument-specific-markup ; markup type for the documentation!
-  ((size 1.2)
-   (harp-pedal-details '())
-   (thickness 0.5))
+(define-markup-command (harp-pedal layout props definition-string) (string?)
+  #:category instrument-specific-markup ; markup type for the documentation!
+  #:properties ((size 1.2)
+               (harp-pedal-details '())
+               (thickness 0.5))
   "Make a harp pedal diagram.
 
 Possible elements in @var{definition-string}:
@@ -40,16 +40,16 @@ the following pedal should be circled (indicating a change)
 @end table
 
 The function also checks if the string has the typical form of three
-pedals, then the divider and then the remaining four pedals. If not it
-prints out a warning. However, in any case, it will also print each symbol
-in the order as given. This means you can place the divider (even multiple
+pedals, then the divider and then the remaining four pedals.  If not it
+prints out a warning.  However, in any case, it will also print each symbol
+in the order as given.  This means you can place the divider (even multiple
 dividers) anywhere you want, but you'll have to live with the warnings.
 
 The appearance of the diagram can be tweaked inter alia using the size property
 of the TextScript grob (@code{\\override Voice.TextScript #'size = #0.3}) for
 the overall, the thickness property
 (@code{\\override Voice.TextScript #'thickness = #3}) for the line thickness of
-the horizontal line and the divider. The remaining configuration (box sizes,
+the horizontal line and the divider.  The remaining configuration (box sizes,
 offsets and spaces) is done by the harp-pedal-details  list of properties
 (@code{\\override Voice.TextScript #'harp-pedal-details #'box-width = #1}).
 It contains the following settings: @code{box-offset} (vertical shift of the
@@ -121,10 +121,13 @@ divider) and @code{space-after-divider} (box spacing after the divider).
         (final-x (car result))
         (stencils (cdr result)))
     ; Add the horizontal line and combine all stencils:
-    (apply ly:stencil-add
-      (cons
-        (make-line-stencil line-width 0 0 final-x 0)
-        stencils))))
+    (box-stencil
+      (apply ly:stencil-add
+        (cons
+          (make-line-stencil line-width 0 0 final-x 0)
+          stencils))
+        0.0
+        0.0)))
 
 ;; Parse the harp pedal definition string into list of directions (-1/0/1), #\o and #\|
 (define (harp-pedals-parse-string definition-string)
@@ -164,4 +167,4 @@ divider) and @code{space-after-divider} (box spacing after the divider).
     (if (null? (cdr info))
       (ly:warning "Harp pedal diagram does not contain a divider (usually after third pedal).")
       (if (not (equal? (cdr info) '(3)))
-        (ly:warning "Harp pedal diagram contains dividers at positions ~a. Normally, there is only one divider after the third pedal." (cdr info))))))
+        (ly:warning "Harp pedal diagram contains dividers at positions ~a.  Normally, there is only one divider after the third pedal." (cdr info))))))