X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Foutput-ps.scm;h=ae8d1e2478207571422a16de71fe1a38d6eb45cc;hb=797245ff520d9c44f0308bbc2828bb4747c84123;hp=aef4802eb71d8b6e41391055a10640dcdf17fe48;hpb=e6cbbfc02ce33ad0b500a3af16e2351f21095f31;p=lilypond.git diff --git a/scm/output-ps.scm b/scm/output-ps.scm index aef4802eb7..ae8d1e2478 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -2,7 +2,7 @@ ;;;; ;;;; source file of the GNU LilyPond music typesetter ;;;; -;;;; (c) 1998--2007 Jan Nieuwenhuizen +;;;; (c) 1998--2009 Jan Nieuwenhuizen ;;;; Han-Wen Nienhuys ;;;; Note: currently misused as testbed for titles with markup, see @@ -14,33 +14,7 @@ ;;;; * document output-interface (define-module (scm output-ps) - #:re-export (quote) - - ;; JUNK this -- see lily.scm: ly:all-output-backend-commands - #:export (unknown - bezier-sandwich - char - circle - comment - dashed-line - dashed-slur - dot - draw-line - ellipse - embedded-ps - named-glyph - no-origin - placebox - polygon - repeat-slash - resetcolor - resetrotation - round-filled-box - setcolor - setrotation - text - )) - + #:re-export (quote)) (use-modules (guile) (ice-9 regex) @@ -135,8 +109,8 @@ (define (glyph-spec w x y g) (let ((prefix (if (string? g) "/" ""))) - (ly:format "~4f ~4f ~a~a" - (+ w x) y + (ly:format "~4f ~4f ~4f ~a~a" + w x y prefix g))) (ly:format @@ -198,10 +172,18 @@ (define (no-origin) "") -(define (placebox x y s) +(define (oval x-radius y-radius thick fill) (ly:format -"~4f ~4f moveto -~a\n" x y s)) + "~a ~4f ~4f ~4f draw_oval" + (if fill + "true" + "false") + x-radius y-radius thick)) + +(define (placebox x y s) + (if (not (string-null? s)) + (ly:format "~4f ~4f moveto ~a\n" x y s) + "")) (define (polygon points blot-diameter filled?) (ly:format "~a ~4l ~a ~4f draw_polygon" @@ -235,7 +217,7 @@ (list r g b))) ;; restore color from stack -(define (resetcolor) "grestore \n") +(define (resetcolor) "grestore\n") ;; rotation around given point (define (setrotation ang x y)