]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/sketch.scm
doc
[lilypond.git] / scm / sketch.scm
index a76f79d5c36c2544181396c1a1cc3b891dcc68b8..e5b2cd7a54caedfc0af8b99694289b521dee8b1f 100644 (file)
 ;;    ))
 
 
-;; guile < 1.4 compatibility for eval
-(if (or (equal? (minor-version) "4")
+;;
+;; All functions have the signature 
+;;
+;;  NAME X Y ARGUMENTS-PASSED-BY-LILYPOND
+;;
+
+;; guile <= 1.4.x compatibility for eval
+(if (or (equal? (minor-version) "4.1")
+       (equal? (minor-version) "4")
        (equal? (minor-version) "3.4"))
     (define (ly-eval e m)
       (eval-in-module e m))
@@ -62,9 +69,6 @@
 
 (define (dispatch-x-y x y expr)
   (apply (ly-eval (car expr) this-module) (append (list x y) (cdr expr))))
-
-
-
       
 (define (ascii->string i) (make-string 1 (integer->char i)))
 
    (sketch-numbers->string (map mul-scale (list width dy dx height x y)))
    ")\n"))
 
+
+(define (roundfilledbox x y dx dy w h b)
+  (filled-rectangle w 0 0 h x y))
+
 (define (sketch-bezier x y l)
   (let* ((c0 (car (list-tail l 3)))
         (c123 (list-head l 3))
      "bc(" (sketch-numbers->string (map mul-scale control)) ",2)\n")))
   
 
+
 (define (sketch-beziers x y l thick)
   (let* ((first (list-tail l 4))
         (second (list-head l 4)))
    (sketch-numbers->string (map mul-scale (list x y)))
    "))\n"))
 
-(define (hairpin x y 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)
@@ -234,13 +238,16 @@ layer('Layer 1',1,1,0,0,(0,0,0))
 (define (invoke-char s i)
   "")
 
+;; TODO: bezier-ending, see ps.scm
+(define (bezier-bow x y l thick)
+  (bezier-sandwich x y l thick))
 
 (define (bezier-sandwich x y l thick)
   (apply
    sketch-beziers (list x y (primitive-eval l) thick)))
 
 ; TODO: use HEIGHT argument
-(define (start-line height)
+(define (start-system height)
    "G()\n"
    )
 
@@ -254,29 +261,18 @@ layer('Layer 1',1,1,0,0,(0,0,0))
 (define (stem x y z w) (filledbox x y z w))
 
 
-(define (stop-line)
+(define (stop-system)
     "G_()\n")
 
 ;; huh?
-(define (stop-last-line)
-   (stop-line))
+(define (stop-last-system)
+   (stop-system))
 
 (define (text x y s)
   (string-append "txt('" s "',(" (sketch-numbers->string
                                  (map mul-scale (list x y))) "))\n"))
 
 
-(define (volta x y 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 x y 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")