]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/ps.scm
doc
[lilypond.git] / scm / ps.scm
index dbc58a79c29611015a3c1bdb4fcb15f0a2448a35..423c3326ada24ccb10afddb1cc01444cfa74e15d 100644 (file)
@@ -14,7 +14,8 @@
 
 (debug-enable 'backtrace)
 
-(if (or (equal? (minor-version) "4")
+(if (or (equal? (minor-version) "4.1")
+       (equal? (minor-version) "4")
        (equal? (minor-version) "3.4"))
     (define-public (ps-output-expression expr port)
       (display (eval-in-module expr this-module) port))
   (invoke-char " show" i))
 
 
-(define (hairpin thick width starth endh )
-  (string-append 
-   (numbers->string (list width starth endh thick))
-   " draw_hairpin"))
 
 ;; what the heck is this interface ?
 (define (dashed-slur thick dash l)
    (ly-number->string off)
    " ] 0 draw_dashed_line"))
 
+(define (draw-line thick x1 y1 x2 y2)
+
+  (string-append 
+  "    1 setlinecap
+       1 setlinejoin "
+  (ly-number->string thick)
+       " setlinewidth "
+   (ly-number->string x1)
+   " "
+   (ly-number->string y1)
+   " moveto "
+   (ly-number->string x2)
+   " "
+   (ly-number->string y2)
+   " lineto stroke"
+
+  ))
+
 (define (repeat-slash wid slope thick)
   (string-append (numbers->string (list wid slope thick))
                 " draw_repeat_slash"))
   (string-append (numbers->string (list breapth width depth height))
                 " draw_box" ))
 
+(define (roundfilledbox x y width height blotdiam)
+   (string-append " "
+      (numbers->string
+         (list x y width height blotdiam)) " draw_round_box"))
+
+(define (dot x y radius)
+    (string-append " "
+     (numbers->string
+      (list x y radius)) " draw_dot"))
+
 ;; obsolete?
 (define (font-def i s)
   (string-append
   (string-append 
    (ly-number->string x) " " (ly-number->string y) " {" s "} place-box\n"))
 
+;; two beziers
 (define (bezier-sandwich l thick)
+  (string-append 
+   (apply string-append (map control->string l))
+   (ly-number->string thick)
+   " draw_bezier_sandwich "))
+
+;; two beziers with round endings
+(define (bezier-bow l thick)
   (string-append 
    (apply string-append (map control->string l))
    (ly-number->string thick)
    (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))))
 
+;; two beziers with round endings
 (define (bezier-ending z0 z1 z2)
   (let ((x0 (car z0))
        (y0 (cdr z0))
 
                                        ; TODO: use HEIGHT argument
 
-  
-(define (start-line height)
+  (define (start-system height)
   (string-append
    "\n"
    (ly-number->string height)
-   " start-line {
+   " start-system {
 set-ps-scale-to-lily-scale
 
 "))
@@ -241,27 +274,16 @@ set-ps-scale-to-lily-scale
   (string-append (numbers->string (list breapth width depth height))
                 " draw_box" ))
 
-(define (stop-line)
-  "}\nstop-line\n")
+(define (stop-system)
+  "}\nstop-system\n")
 
-(define (stop-last-line)
-  "}\nstop-line\n")
+(define (stop-last-system)
+  "}\nstop-system\n")
 
 (define (text s)
   (string-append "(" s ") show  "))
 
 
-(define (volta h w thick vert_start vert_end)
-  (string-append 
-   (numbers->string (list h w thick (inexact->exact vert_start) (inexact->exact vert_end)))
-   " draw_volta"))
-
-(define (tuplet ht gap dx dy thick dir)
-  (string-append 
-   (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
-   " draw_tuplet"))
-
-
 (define (unknown) 
   "\n unknown\n")