]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.42
authorfred <fred>
Wed, 27 Mar 2002 02:06:59 +0000 (02:06 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:06:59 +0000 (02:06 +0000)
ps/music-drawing-routines.ps
scm/ps.scm

index a4c83114657fef3a603c0d53be2981c1b0a50466..93e82f9aaff2d689546feffac159a5cd4a2cdd6d 100644 (file)
        stroke 
 } bind def 
 
+/draw_dot % x1 y2 R
+{
+%      0 360 arc fill stroke
+       0 360 arc closepath fill stroke
+} bind def
+
 /draw_dashed_line % dash thickness dx dy
 { 
        1 setlinecap 
index 496bc521e602bf9d6d1af2a5aacb3e95047b427f..e002e8b23c0f3de21cb7c5c2e55e024b5d0405b3 100644 (file)
 (define (bezier-sandwich l thick)
   (string-append 
    (apply string-append (map control->string l))
-   (ly-number->string  thick)
-   " draw_bezier_sandwich"))
+   (ly-number->string thick)
+   " draw_bezier_sandwich "
+   (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
+   (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5))))
+
+(define (bezier-ending z0 z1 z2)
+  (let ((x0 (car z0))
+       (y0 (cdr z0))
+       (x1 (car z1))
+       (y1 (cdr z1))
+       (x2 (car z2))
+       (y2 (cdr z2)))
+    (string-append " "
+     (numbers->string
+      (list x0 y0
+           (/ (sqrt (+ (* (- x1 x2) (- x1 x2)) (* (- y1 y2) (- y1 y2)))) 2)))
+     " draw_dot")))
 
                                        ; TODO: use HEIGHT argument
 (define (start-line height)