;;;;
;;;; source file of the GNU LilyPond music typesetter
;;;;
-;;;; (c) 1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 1998--2005 Jan Nieuwenhuizen <janneke@gnu.org>
;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;; (debug-enable 'backtrace)
-
;; The public interface is tight.
;; It has to be, because user-code is evalled with this module.
;; JUNK this -- see lily.scm: ly:all-output-backend-commands
#:export (unknown
blank
+ circle
dot
white-dot
beam
round-filled-box
text
white-text
+ setcolor
+ resetcolor
polygon
draw-line
no-origin
(define (unknown)
"%\n\\unknown\n")
-
+(define (url-link url x y)
+ "")
(define (blank)
"")
+(define (circle radius thick)
+ (embedded-ps (list 'circle radius thick)))
+
(define (dot x y radius)
(embedded-ps (list 'dot x y radius)))
-
(define (embedded-ps string)
(embedded-ps (list 'embedded-ps string)))
(define (bracket arch_angle arch_width arch_height height arch_thick thick)
(embedded-ps (list 'bracket arch_angle arch_width arch_height height arch_thick thick)))
-(define (dashed-slur thick dash lst)
- (embedded-ps (list 'dashed-slur thick dash `(quote ,lst))))
+(define (dashed-slur thick on off lst)
+ (embedded-ps (list 'dashed-slur thick on off `(quote ,lst))))
(define (named-glyph font name)
(let* ((info (ly:otf-font-glyph-info font name))
(define (white-text scale s)
(embedded-ps (list 'white-text scale s)))
+(define (setcolor r g b)
+ (string-append "\\color[rgb]{"
+ (number->string r) ", "
+ (number->string g) ", "
+ (number->string b) "}"))
+
+;; FIXME
+;; The PostScript backend saves the current color
+;; during setcolor and restores it during resetcolor.
+;; We don't do that here.
+(define (resetcolor)
+ (string-append "\\color[rgb]{0,0,0}\n"))
+
(define (polygon points blotdiameter)
(embedded-ps (list 'polygon `(quote ,points) blotdiameter)))
;; no-origin not yet supported by Xdvi
(define (no-origin) "")
-(define (grob-cause grob)
+(define (grob-cause offset grob)
(if (procedure? point-and-click)
(let* ((cause (ly:grob-property grob 'cause))
(music-origin (if (ly:music? cause)
(ly:music-property cause 'origin)))
(location (if (ly:input-location? music-origin)
- (ly:input-location music-origin))))
+ (ly:input-file-line-column music-origin))))
(if (pair? location)
;;; \\string ?
(string-append "\\special{src:"