From cb61b9bfa65a8650aa420dc6202b23992e7d15d0 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 11 Mar 2005 01:53:23 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 3 + Documentation/topdocs/NEWS.tely | 5 +- scm/output-pdf.scm | 266 -------------------------- scm/output-pdftex.scm | 219 ---------------------- scm/output-sketch.scm | 321 -------------------------------- 5 files changed, 6 insertions(+), 808 deletions(-) delete mode 100644 scm/output-pdf.scm delete mode 100644 scm/output-pdftex.scm delete mode 100644 scm/output-sketch.scm diff --git a/ChangeLog b/ChangeLog index dc49baf0ad..e82478bc11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,10 @@ 2005-03-11 Han-Wen Nienhuys + * scm/output-{pdf,pdftex,sketch}.scm (Module): remove bitrotted files. + * scm/framework-svg.scm (output-framework): put scaling in document header. Apply scaling only once. + (output-framework): dump page size in px, not mm. * scm/lily-library.scm (modified-font-metric-font-scaling): rename from font-size. diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index 80845aefec..735e2dfbd4 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -29,8 +29,9 @@ See user manual, \NAME\ @itemize @bullet @item -Notes with ledger lines will be kept at a distance, so the lines do -not disappear. +Notes with ledger lines will be kept at a distance, so they never +disappear. + @item Clefs that are below notes of other staves are now spaced according to engraving conventions. diff --git a/scm/output-pdf.scm b/scm/output-pdf.scm deleted file mode 100644 index 3bf6469a58..0000000000 --- a/scm/output-pdf.scm +++ /dev/null @@ -1,266 +0,0 @@ -;;;; pdf.scm -- implement Scheme output routines for PDF. -;;;; -;;;; source file of the GNU LilyPond music typesetter -;;;; -;;;; (c) 2001--2005 Stephen Peters - - -;currently no font commands; this is a helper for pdftex.scm. - -(define-module (scm output-pdf)) - - - -(define this-module (current-module)) - -(use-modules - (guile) - (lily)) - - - -; simple commands to store and update currentpoint. This makes the -; other procedures simple rewrites of the PostScript code. - -(define currentpoint (cons 0 0)) -(define (showcp) - (string-append (ly:number-pair->string currentpoint) " ")) -(define (moveto x y) - (set! currentpoint (cons x y)) - (string-append (showcp) "m ")) -(define (moveto-pair pair) - (moveto (car pair) (cdr pair))) -(define (rmoveto x y) - (moveto (+ x (car currentpoint)) (+ y (cdr currentpoint)))) -(define (lineto x y) - (set! currentpoint (cons x y)) - (string-append (showcp) "l ")) -(define (lineto-pair pair) - (lineto (car pair) (cdr pair))) -(define (rlineto x y) - (lineto (+ x (car currentpoint)) (+ y (cdr currentpoint)))) -(define (curveto x1 y1 x2 y2 x y) - (set! currentpoint (cons x y)) - (string-append (ly:number->string x1) " " (ly:number->string y1) " " - (ly:number->string x2) " " (ly:number->string y2) " " - (ly:number->string x) " " (ly:number->string y) " c ")) -(define (curveto-pairs pt1 pt2 pt) - (curveto (car pt1) (cdr pt1) (car pt2) (cdr pt2) (car pt) (cdr pt))) -(define (closefill) "h f ") -(define (closestroke) "S ") -(define (setlinewidth w) (string-append (ly:number->string w) " w ")) -(define (setgray g) (string-append (ly:number->string g) " g ")) -(define (setlineparams) "1 j 1 J ") - -(define (beam width slope thick blot) - (let ((ht (* slope width))) - (string-append (moveto 0 (- (/ thick 2))) - (rlineto width ht) - (rlineto 0 thick) - (lineto 0 (/ thick 2)) - (closefill)))) - -(define (brack-traject pair ds alpha) - (let ((alpha-rad (* alpha (/ 3.141592654 180)))) - (cons (+ (car pair) (* (cos alpha-rad) ds)) - (+ (cdr pair) (* (sin alpha-rad) ds))))) - -(define (bracket arch_angle arch_width arch_height height arch_thick thick) - (let* ((halfht (+ (/ height 2) thick)) - (farpt (cons (+ thick arch_height) - (+ (- halfht arch_thick) arch_width))) - (halfbrack - (string-append (moveto 0 0) - (lineto thick 0) - (lineto thick (- halfht arch_thick)) - (curveto-pairs - (brack-traject (cons thick - (- halfht arch_thick)) - (* 0.4 arch_height) 0) - (brack-traject farpt - (* -0.25 arch_height) - arch_angle) - farpt) - (curveto-pairs - (brack-traject farpt - (* -0.15 arch_height) - arch_angle) - (brack-traject (cons (/ thick 2) halfht) - (/ arch_height 2) 0) - (cons 0 halfht)) - (lineto 0 0) - (closefill)))) - (string-append (setlinewidth (/ thick 2)) - (setlineparams) - "q 1 0 0 -1 0 0 cm " ; flip coords - halfbrack - "Q " ; grestore - halfbrack))) - -(define (char i) - (invoke-char " show" i)) - - -(define (dashed-slur thick on off l) - (string-append (setlineparams) - "[ " (ly:number->string on) " " - (ly:number->string off) " ] 0 d " - (setlinewidth thick) - (moveto-pair (car l)) - (apply curveto (cdr l)) - (closestroke))) - -(define (dashed-line thick on off dx dy) - (string-append (setlineparams) - "[ " (ly:number->string on) " " - (ly:number->string off) " ] 0 d " - (setlinewidth thick) - (moveto 0 0) - (lineto dx dy) - (closestroke))) - -(define (repeat-slash width slope beamthick) - (let* ((height (/ beamthick slope)) - (xwid (sqrt (+ (* beamthick beamthick) (* height height))))) - (string-append (moveto 0 0) - (rlineto xwid 0) - (rlineto width (* slope width)) - (rlineto (- xwid) 0) - (closefill)))) - - -(define (experimental-on) "") - -(define (filledbox breadth width depth height) - (string-append (ly:number->string (- breadth)) " " - (ly:number->string (- depth)) " " - (ly:number->string (+ breadth width)) " " - (ly:number->string (+ depth height)) - " re f ")) - -(define (round-filled-box breadth width depth height blotdiam) - (let* ((rad (/ blotdiam 2)) - (h (- height rad)) - (d (- depth rad)) - (w (- width rad)) - (b (- breadth rad))) - (string-append " 0 J " - (setlinewidth blotdiam) - "1 j " - (moveto (- b) (- d)) - (rlineto (+ b w) 0) - (rlineto 0 (+ d h)) - (rlineto (- (+ b w)) 0) - (rlineto 0 (- (+ d h))) - "b "))) - -;; PDF doesn't have the nifty arc operator. This uses a fast -;; approximation with two curves. It bulges out a bit more than a -;; true circle should along the 45 degree axes, but most users won't -;; notice. -(define (dot x y radius) - (string-append (moveto (- x radius) y) - (curveto (- x radius) (+ y (* 1.3333 radius)) - (+ x radius) (+ y (* 1.3333 radius)) - (+ x radius) y) - (curveto (+ x radius) (- y (* 1.3333 radius)) - (- x radius) (- y (* 1.3333 radius)) - (- x radius) y) - "f ")) - - -(define (round-filled-box breadth width depth height blot) - (filledbox breadth width depth height)) - -(define (font-def i s) "") - -(define (font-switch i) "") - -(define (header-end) "") - -(define (lily-def key val) "") - -(define (header creator generate) "") - -(define (invoke-char s i) - (string-append - "(\\" (ly:inexact->string i 8) ") " s " " )) - -(define (placebox x y s) "") - -(define (bezier-sandwich lst thick) - (string-append (setlinewidth thick) - (moveto-pair (list-ref lst 7)) - (curveto-pairs (list-ref lst 4) - (list-ref lst 5) - (list-ref lst 6)) - (lineto-pair (list-ref lst 3)) - (curveto-pairs (list-ref lst 0) - (list-ref lst 1) - (list-ref lst 2)) - "B " - (bezier-ending (list-ref lst 3) (list-ref lst 0) (list-ref lst 5)) - (bezier-ending (list-ref lst 7) (list-ref lst 0) (list-ref lst 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))) - (dot x0 y0 - (/ (sqrt (+ (* (- x1 x2) (- x1 x2)) - (* (- y1 y2) (- y1 y2)))) 2)))) - - -(define (start-system width height) "") - -(define (stem breadth width depth height) - (filledbox breadth width depth height)) - -(define (stop-system) "") - -(define (text s) "") - -(define (polygon points blotdiameter) "") ;; TODO - -(define (draw-line thick fx fy tx ty) - (string-append (setlineparams) - (setlinewidth thick) - (moveto fx fy) - (lineto tx ty) - "S ")) - -(define (unknown) "\n unknown\n") - -; Problem here -- we're using /F18 for the font, but we don't know -; for sure that that will exist. - -(define (ez-ball ch letter-col ball-col) - (let ((origin (cons 0.45 0))) - (string-append (setgray 0) - (setlinewidth 1.1) - (moveto-pair origin) (lineto-pair origin) - (closestroke) - (setgray ball-col) - (setlinewidth 0.9) - (moveto-pair origin) (lineto-pair origin) - (closestroke) - (setgray letter-col) - (moveto-pair origin) - "BT " - "/F18 0.85 Tf " - "-0.28 -0.30 Td " ; move for text block - "[(" ch ")] TJ ET "))) - -(define (define-origin a b c ) "") -(define (no-origin) "") - -(define-public (pdf-output-expression expr port) - (display (eval expr this-module) port) ) - - -; Local Variables: -; scheme-program-name: "guile" -; End: diff --git a/scm/output-pdftex.scm b/scm/output-pdftex.scm deleted file mode 100644 index 968b718a40..0000000000 --- a/scm/output-pdftex.scm +++ /dev/null @@ -1,219 +0,0 @@ -;;;; pdftex.scm -- implement Scheme output routines for PDFTeX -;;;; -;;;; source file of the GNU LilyPond music typesetter -;;;; modified from the existing tex.scm -;;;; -;;;; (c) 1998--2005 Jan Nieuwenhuizen -;;;; Han-Wen Nienhuys -;;;; Stephen Peters - - -;; TODO: port this to the new module framework. - -(define-module (scm output-pdftex)) - -(use-modules (scm output-pdf) - (guile) - (ice-9 regex) - (ice-9 string-fun) - (lily)) - -(define font-name-alist '()) - -(define this-module (current-module)) -(define (unknown) - "%\n\\unknown\n") - -(define (select-font name-mag-pair) - (let* ((c (assoc name-mag-pair font-name-alist))) - - (if (eq? c #f) - (begin - (display "FAILED\n") - (display (object-type (car name-mag-pair))) - (display (object-type (caaar font-name-alist))) - - (ly:warn "Programming error: No such font known ~S ~S" - (car name-mag-pair) - (ly:number->string (cdr name-mag-pair))) - "") ; issue no command - (string-append "\\" (cddr c))))) - -(define (beam width slope thick blot) - (embedded-pdf (list 'beam width slope thick blot))) - -(define (bracket arch_angle arch_width arch_height height arch_thick thick) - (embedded-pdf (list 'bracket arch_angle arch_width arch_height height arch_thick thick))) - -(define (dashed-slur thick on off lst) - (embedded-pdf (list 'dashed-slur thick on off lst))) - -(define (char i) - (string-append "\\char" (ly:inexact->string i 10) " ")) - -(define (dashed-line thick on off dx dy) - (embedded-pdf (list 'dashed-line thick on off dx dy))) - -(define (font-load-command name-mag command) - (string-append - "\\font\\" command "=" - (car name-mag) - " scaled " - (ly:number->string (inexact->exact (* 1000 (cdr name-mag)))) - "\n")) - -(define (ez-ball c lst b) - (embedded-pdf (list 'ez-ball c lst b))) - -(define (header-to-file fn key val) - (set! key (symbol->string key)) - (if (not (equal? "-" fn)) - (set! fn (string-append fn "." key))) - (display - (format "writing header field `~a' to `~a'..." - key - (if (equal? "-" fn) "" fn)) - (current-error-port)) - (if (equal? fn "-") - (display val) - (display val (open-file fn "w"))) - (display "\n" (current-error-port)) - "") - -(define (embedded-pdf expr) - (let ((os (open-output-string))) - (pdf-output-expression expr os) - (string-append "\\embeddedpdf{" (get-output-string os) "}"))) - -(define (experimental-on) - "") - -(define (repeat-slash w a t) - (embedded-pdf (list 'repeat-slash w a t))) - -(define (tex-encoded-fontswitch name-mag) - (let* ((iname-mag (car name-mag)) - (ename-mag (cdr name-mag))) - (cons iname-mag - (cons ename-mag - (string-append "magfont" - (string-encode-integer - (hashq (car ename-mag) 1000000)) - "m" - (string-encode-integer - (inexact->exact (* 1000 (cdr ename-mag))))))))) -(define (define-fonts internal-external-name-mag-pairs) - (set! font-name-alist (map tex-encoded-fontswitch - internal-external-name-mag-pairs)) - (apply string-append - (map (lambda (x) - (font-load-command (car x) (cdr x))) - (map cdr font-name-alist)))) - -(define (font-switch i) - (string-append - "\\" (font i) "\n")) - -(define (font-def i s) - (string-append - "\\font" (font-switch i) "=" s "\n")) - -(define (header-end) - (string-append - "\\def\\lilyoutputscalefactor{" - (number->string (cond - ((equal? (ly:unit) "mm") (/ 72.0 25.4)) - ((equal? (ly:unit) "pt") (/ 72.0 72.27)) - (else (error "unknown unit" (ly:unit))))) - "}%\n" - "\\ifx\\lilypondstart\\undefined\n" - " \\input lilyponddefs\n" - "\\fi\n" - "\\outputscale=\\lilypondpaperoutputscale \\lilypondpaperunit\n" - "\\lilypondpostscript\n" - "\\pdfcompresslevel=0")) - -;; Note: this string must match the string in lilypond.py!!! -(define (header creator generate) - (string-append - "% Generated automatically by: " creator generate "\n")) - -(define (invoke-char s i) - (string-append - "\n\\" s "{" (ly:inexact->string i 10) "}" )) - -;; FIXME: explain ploblem: need to do something to make this really safe. -(define (output-tex-string s) - (if (ly:get-option 'safe) - (regexp-substitute/global - #f "\\\\" - (regexp-substitute/global #f "\\([{}]\\)" s 'pre "\\1" 'post) - 'pre "$\\backslash$" 'post) - s)) - -(define (lily-def key val) - (let ((tex-key - (regexp-substitute/global - #f "_" (output-tex-string key) 'pre "X" 'post)) - (tex-val (output-tex-string val))) - (if (equal? (sans-surrounding-whitespace tex-val) "") - (string-append "\\let\\" tex-key "\\undefined\n") - (string-append "\\def\\" tex-key "{" tex-val "}%\n")))) - -(define (number->dim x) - (string-append - ;;ugh ly:* in backend needs compatibility func for standalone output - (ly:number->string x) " \\outputscale ")) - -(define (placebox x y s) - (string-append "\\lyitem{" - (ly:number->string y) "}{" - (ly:number->string x) "}{" - s "}%\n")) - -(define (bezier-sandwich lst thick) - (embedded-pdf (list 'bezier-sandwich `(quote ,lst) thick))) - -(define (start-system wd ht) - (string-append "\\leavevmode\n" - "\\scoreshift = " (number->dim (* ht 0.5)) "\n" - "\\lilypondifundefined{lilypondscoreshift}%\n" - " {}%\n" - " {\\advance\\scoreshift by -\\lilypondscoreshift}%\n" - "\\lybox{" - (ly:number->string wd) "}{" - (ly:number->string ht) "}{%\n")) - -(define (stop-system) - "}%\n%\n\\interscoreline\n%\n") -(define (stop-last-system) - "}%\n") - -(define (filledbox breapth width depth height) - (string-append "\\lyvrule{" - (ly:number->string (- breapth)) "}{" - (ly:number->string (+ breapth width)) "}{" - (ly:number->string depth) "}{" - (ly:number->string height) "}")) - -(define (round-filled-box x y width height blotdiam) - (embedded-pdf (list 'round-filled-box x y width height blotdiam))) - -(define (text s) - (string-append "\\hbox{" (output-tex-string s) "}")) - -(define (draw-line thick fx fy tx ty) - (embedded-pdf (list 'draw-line thick fx fy tx ty))) - -(define (define-origin file line col) - (if (procedure? point-and-click) - (string-append "\\special{src:\\string:" - (point-and-click line col file) - "}" ) - "")) - -;; no-origin not supported in PDFTeX -(define (no-origin) "") - -(define-public (pdftex-output-expression expr port) - (display (eval expr this-module) port)) diff --git a/scm/output-sketch.scm b/scm/output-sketch.scm deleted file mode 100644 index f136f8a721..0000000000 --- a/scm/output-sketch.scm +++ /dev/null @@ -1,321 +0,0 @@ -;;;; sketch.scm -- implement Scheme output routines for Sketch -;;;; -;;;; source file of the GNU LilyPond music typesetter -;;;; -;;;; (c) 1998--2005 Jan Nieuwenhuizen -;;;; Han-Wen Nienhuys - - -;; def dispats (out,x,y,expr): -;; (symbol, rest) = expr -;; if symbol == 'placebox': -;; (dx,dy,expr) = rest -;; dispats (out, x + dx, y + dy, expr) -;; # hier wordt (X+DX) dus eerder gedaan dan dispats van EXPR. -;; # er zijn geen "globale" variabelen. -;; elif symbol == 'char': -;; out.write ('moveto( %f %f); char(%d)' % (x,y,rest)) - - - - -;; -;; All functions have the signature -;; -;; NAME X Y ARGUMENTS-PASSED-BY-LILYPOND -;; - -(define-module (scm output-sketch)) -(debug-enable 'backtrace) - -(define this-module (current-module)) - -(define-public (sketch-output-expression expr port) - (display (dispatch expr) port)) - -(use-modules (ice-9 format) (guile) (lily)) - -;; hmm -; (define (dispatch x y expr) -; (let ((keyword (car expr))) -; (cond -; ((eq? keyword 'beam x y width slope thick) -; ((eq? keyword 'bezier-sandwich x y lst thick) -; ((eq? keyword 'bracket arch_angle arch_width arch_height height arch_thick thick) -; ((eq? keyword 'char x y i) -; ((eq? keyword 'comment s) -; ((eq? keyword 'dashed-line thick on off dx dy) -; ((eq? keyword 'dashed-slur thick dash lst) -; ((eq? keyword 'define-origin a b c ) "") -; ((eq? keyword 'experimental-on) "") -; ((eq? keyword 'ez-ball ch letter-col ball-col) -; ((eq? keyword 'filledbox x y breapth width depth height) -; ((eq? keyword 'font-load-command name-mag command) -; ((eq? keyword 'font-switch i) -; ((eq? keyword 'header creator generate) -; ((eq? keyword 'header-end) -; ((eq? keyword 'invoke-char s i) -; ((eq? keyword 'lily-def key val) -; ((eq? keyword 'no-origin) "") -; ((eq? keyword 'output-scale 1) -; ((eq? keyword 'placebox) -; (dispatch (+ x (cadr expr)) (+ y (caddr expr) (cadddr expr)))) -; ((eq? keyword 'repeat-slash wid slope thick) -; ((eq? keyword 'round-filled-box x y dx dy w h b) -; ((eq? keyword 'select-font name-mag-pair) -; ((eq? keyword 'start-system width height) -; ((eq? keyword 'stem x y z w) (filledbox x y z w)) -; ((eq? keyword 'stop-last-system) -; ((eq? keyword 'stop-system) -; ((eq? keyword 'text x y s) -; ((eq? keyword 'unknown) - -; ))) - - -(define current-y 150) - -(define (dispatch expr) - (let ((keyword (car expr))) - (cond - ((eq? keyword 'placebox) - (dispatch-x-y (cadr expr) (+ current-y (caddr expr)) (cadddr expr))) - (else - (apply (eval keyword this-module) (cdr expr)))))) - -(define (dispatch-x-y x y expr) - (apply (eval (car expr) this-module) (append (list x y) (cdr expr)))) - -(define (ascii->string i) (make-string 1 (integer->char i))) - -(define (control->list x y c) - (list (+ x (car c)) (+ y (cdr c)))) - -(define (control-flip-y c) - (cons (car c) (* -1 (cdr c)))) - -;;; urg. -(define (sketch-numbers->string lst) - (string-append - (ly:number->string (car lst)) - (if (null? (cdr lst)) - "" - (string-append "," (sketch-numbers->string (cdr lst)))))) - -;;;\def\scaletounit{ 2.83464566929134 mul }% - -;;(define output-scale 2.83464566929134) - - -(define (mul-scale x) (* scale-to-unit output-scale x)) - -(define (sketch-filled-rectangle width dy dx height x y) - (string-append - "fp((0,0,0))\n" - "lw(0.1)\n" - "r(" - (sketch-numbers->string (map mul-scale (list width dy dx height x y))) - ")\n")) - - -(define (sketch-bezier x y lst) - (let* ((c0 (car (list-tail lst 3))) - (c123 (list-head lst 3)) - (start (control->list x y c0)) - (control (apply append - (map (lambda (c) (control->list x y c)) c123)))) - (string-append - "bs(" (sketch-numbers->string (map mul-scale start)) ",0)\n" - "bc(" (sketch-numbers->string (map mul-scale control)) ",2)\n"))) - - - -(define (sketch-beziers x y lst thick) - (let* ((first (list-tail lst 4)) - (second (list-head lst 4))) - (string-append - "fp((0,0,0))\n" - "lw(0.1)\n" - "b()\n" - (sketch-bezier x y first) - (sketch-bezier x y second)))) - - -;; alist containing fontname -> fontcommand assoc (both strings) -;; old scheme -;;(define font-alist '(("feta13" . ("feta13" . "13")) -;; ("feta20" . ("feta20" . "20")))) -(define font-alist '(("feta13" . ("LilyPond-Feta13" . "13")) -;; ("feta20" . ("LilyPond-Feta-20" . "20") - ("feta20" . ("GNU-LilyPond-feta-20" . "20") - ))) - -;;(define font "") -(define font (cdar font-alist)) - -(define font-count 0) -(define current-font "") - -(define (define-fonts x) "") - -(define (font-def x) -"") - - -(define (cached-fontname i) - "") - - -(define (round-filled-box x y dx dy w h b) - (sketch-filled-rectangle w 0 0 h x y)) - -(define (polygon points blotdiameter) "") ;; TODO - -(define (select-font name-mag-pair) - ;; name-mag-pair: (quote ("feta20" . 0.569055118110236))"feta20"(quote ("feta20" . 0.569055118110236)) - (let ((f (assoc (caadr name-mag-pair) font-alist))) - (if (pair? f) - (set! font (cdr f)) - (format #t "font not found: ~s\n" (caadr name-mag-pair)))) - ;;(write font) - "") - -(define (font-load-command name-mag command) - "") - -(define (beam x y width slope thick blot) - (apply sketch-filled-rectangle - (list width (* slope width) 0 thick x y))) - -(define (comment s) - (string-append "# " s "\n")) - -(define (bracket arch_angle arch_width arch_height height arch_thick thick) - (string-append - (ly:numbers->string (list arch_angle arch_width arch_height height arch_thick thick)) " draw_bracket" )) - -(define (char x y i) - (string-append - "fp((0,0,0))\n" - "le()\n" - "lw(0.1)\n" - "Fn('" (car font) "')\n" - "Fs(" (cdr font) ")\n" - ;; how to get zero-left padding with ``Guile's fprintf'' ? - ;;(format #f "txt('\\x~2x',(" i) - ;;(format #f "txt('\\x~02x',(" i) - ;; ugh: python's '%02x' % i - (format #f "&#x~2,'0x;" i) - (sketch-numbers->string (map mul-scale (list x y))) - "))\n")) - - -;; what the heck is this interface ? -(define (dashed-slur thick on off l) - "") - -(define (dashed-line thick on off dx dy) - (string-append - (ly:number->string dx) - " " - (ly:number->string dy) - " " - (ly:number->string thick) - " [ " - (ly:number->string on) - " " - (ly:number->string off) - " ] 0 draw_dashed_line")) - -(define (repeat-slash wid slope thick) - (string-append (ly:numbers->string (list wid slope thick)) - " draw_repeat_slash")) - -(define (end-output) - "guidelayer('Guide Lines',1,0,0,1,(0,0,1)) -grid((0,0,20,20),0,(0,0,1),'Grid')\n") - -(define (experimental-on) "") - -(define (font-switch i) - "") - -(define (header-end) - "") - -(define output-scale 1) - -(define (lily-def key val) - (if (equal? key "lilypondpaperoutputscale") - ;; ugr - (set! output-scale (string->number val)) - ) - "") - - -(define (header creator generate) - (string-append - "##Sketch 1 2 -document() -layout('A4',0) -layer('Layer 1',1,1,0,0,(0,0,0)) -")) - -(define (invoke-char s i) - "") - -(define (bezier-sandwich x y lst thick) - (apply - sketch-beziers (list x y (primitive-eval lst) thick))) - -(define (start-system width height) - (set! current-y (- current-y height)) - "G()\n") - -;; r((520.305,0,0,98.0075,51.8863,10.089)) -;; width, 0, 0, height, x, y -(define (filledbox x y breapth width depth height) - (apply sketch-filled-rectangle - (list - (+ breapth width) 0 0 (+ depth height) (- x breapth) (- y depth)))) - -(define (stem x y z w) (filledbox x y z w)) - - -(define (stop-system) - "G_()\n") - -;; huh? -(define (stop-last-system) - (stop-system)) - -(define (text x y s) - (string-append - "fp((0,0,0))\n" - "le()\n" - "lw(0.1)\n" - "Fn('" (car font) "')\n" - "Fs(" (cdr font) ")\n" - ;; Hmm - "txt('" s "',(" (sketch-numbers->string - (map mul-scale (list x y))) "))\n")) - -(define (unknown) - "\n unknown\n") - -(define (ez-ball ch letter-col ball-col) - (string-append - " (" ch ") " - (ly:numbers->string (list letter-col ball-col)) - " /Helvetica-Bold " ;; ugh - " draw_ez_ball")) - -(define (define-origin a b c ) "") -(define (no-origin) "") - - - -;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;;;;;;;;;;;; - - -- 2.39.5