]> git.donarmstrong.com Git - lilypond.git/commitdiff
color patch by EA
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 31 Mar 2005 12:30:18 +0000 (12:30 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 31 Mar 2005 12:30:18 +0000 (12:30 +0000)
ChangeLog
THANKS
scm/output-tex.scm
tex/lilyponddefs.tex

index 1f7dcc680a551cc1797a713fff49287cfebc12f0..765695319a2769d2dcb42142f04b573f795f7b02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-31  Erlend Aasland  <erlenda@gmail.com>
+
+       * scm/output-tex.scm: implement {re,}setcolor
+       * tex/lilyponddefs.tex: use color package
+
 2005-03-31  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * Documentation/user/macros.itexi: Fix @usermanref html links in
diff --git a/THANKS b/THANKS
index fadfb53346ffb36a95c3dafa6fe9ba91fc75f7e4..109d559080c6a9c801780e335e5f84e8dcc67256 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -16,6 +16,7 @@ Arno Waschk
 Bertalan Fodor
 Carl Sorensen
 Christian Hitz
+David Jedlinsky
 Erlend Aasland
 Heikki Junes
 Jeff Smith
@@ -45,7 +46,6 @@ Andreas Scherer
 Anthony W. Youngman
 Antti Kaihola
 Arjan Bos
-David Jedlinsky
 Dylan Nicholson
 Ed Jackson
 Erik Ronström
index 43e68d7782d5cfa6efe0d242c30ac62906d2f738..7d5bffda091fa6ffe8e95bb8a58d19ed7d5eced2 100644 (file)
@@ -43,6 +43,8 @@
            round-filled-box
            text
            white-text
+           setcolor
+           resetcolor
            polygon
            draw-line
            no-origin
 (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}"))
+
 (define (polygon points blotdiameter)
   (embedded-ps (list 'polygon `(quote ,points) blotdiameter)))
 
index 169c73575b6c0912814054b7f8f431463766e5d3..9746d707aa4cba87e388bf74fe0c3744ff44fbce 100644 (file)
        \fi
        \pagestyle{empty}
 
+       \usepackage{xcolor}
+
        \lilypondifundefined{lilypondclassic}
          {%% If not in `classic' mode, undo LaTeX's page layout settings
           %% since LilyPond does the layout by itself.