]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-tex.scm
*** empty log message ***
[lilypond.git] / scm / output-tex.scm
index c0aa31680bcb9fa7f94228bc141a643923235390..4246aa2cb5e2b871cc9378ab28a04850276f8687 100644 (file)
@@ -2,12 +2,10 @@
 ;;;;
 ;;;;  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.
 
@@ -24,6 +22,7 @@
   ;; JUNK this -- see lily.scm: ly:all-output-backend-commands
   #:export (unknown
            blank
+           circle
            dot
            white-dot
            beam
@@ -42,6 +41,8 @@
            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 (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:"