]> git.donarmstrong.com Git - lilypond.git/commitdiff
(beam): add function.
authorhanwen <hanwen>
Mon, 15 Nov 2004 23:18:34 +0000 (23:18 +0000)
committerhanwen <hanwen>
Mon, 15 Nov 2004 23:18:34 +0000 (23:18 +0000)
scm/output-gnome.scm
scripts/lilypond-book.py

index 91cfdfff80844be8c685a93cc80d866db495601f..5bfc43d5fe40164b07ab16dae0e5360fe3e1ad54 100644 (file)
@@ -241,6 +241,26 @@ lilypond -fgnome input/simple-song.ly
          item)
        #f)))
 
+(define (beam width slope thick blot)
+  (let*
+      ((def (make <gnome-canvas-path-def>))
+       (props (make <gnome-canvas-bpath>
+                  #:parent (canvas-root)
+                  #:fill-color "black"
+                  #:outline-color "black"
+                  #:width-units 0.0)))
+    
+    (reset def)
+    (moveto def 0 0)
+    (lineto def width (* width slope))
+    (lineto def width (- thick))
+    (lineto def 0 (- thick))
+    (lineto def 0 0)
+    (closepath def)
+    (set-path-def props def)
+    props))
+    
+
 (define (round-filled-box breapth width depth height blot-diameter)
   ;; FIXME: no rounded corners on rectangle...
   ;; FIXME: blot?
index cd97022f591c6a7bd443f44775370d6e672ca4ae..0a696f7ff6658e89c83ad7d3847ae757583ff412 100644 (file)
@@ -711,7 +711,7 @@ def compose_ly (code, options, type):
     if RELATIVE in override.keys () and override[RELATIVE]:
        relative = string.atoi (override[RELATIVE])
 
-    relative_quotes = ''
+!    relative_quotes = ''
 
     # 1 = central C
     if relative < 0: