lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does anybody use x11-color ?


From: Till Rettig
Subject: Re: Does anybody use x11-color ?
Date: Sat, 08 Dec 2007 14:24:29 +0200
User-agent: Thunderbird 2.0.0.6 (X11/20071022)



Graham Percival schrieb:

Please add a snippet to LSR.
Sorry, one of us doesn't probably understand right. I thought about enhancing the table that is in the docs. So I would not really make a feature that would be useful to anybody but just show the colours in the printed output (html and pdf) so people get an idea what they look like. That's why I hadn't yet added it to LSR as it seems not to belong there.

Please have a look at the lilypond example I created using direct post script commands. It is an ugly hack, I suppose, but might illustrate what I am after. If you now think it is for LSR I will gladly add it there. This example is only a draft, so I will make it better looking and complete the other colours.

I couldn't make it modular since \postscript didn't want to work inside a defined variable.

Greetings
Till

%%%%LY FILE%%%%%%
\markup { \postscript #"0.2 setlinewidth 1 setlinecap 0 0 moveto 0 2 rlineto 3.6 0 rlineto 0 -2 rlineto -3.6 0 rlineto stroke"
           \with-color #black { \postscript #" -0.5 0 moveto
                       -0.5 2 lineto
                       3 2 lineto
                       3 0 lineto
                       -0.5 0 lineto
                       closepath
                       fill
                      "
              }
\postscript #"0.2 setlinewidth 1 setlinecap 5 0 moveto 0 2 rlineto 3.6 0 rlineto 0 -2 rlineto -3.6 0 rlineto stroke"
           \with-color #white { \postscript #" 4.5 0 moveto
                       4.5 2 lineto
                       8 2 lineto
                       8 0 lineto
                       4.5 0 lineto
                       closepath
                       fill
                      "
} \postscript #"0.2 setlinewidth 1 setlinecap 10 0 moveto 0 2 rlineto 3.6 0 rlineto 0 -2 rlineto -3.6 0 rlineto stroke"
           \with-color #red { \postscript #" 9.5 0 moveto
                       9.5 2 lineto
                       13 2 lineto
                       13 0 lineto
                       9.5 0 lineto
                       closepath
                       fill
                      "
} } \markup { "black" "white" "red" } \markup { \postscript #"0.2 setlinewidth 1 setlinecap 0 0 moveto 0 2 rlineto 3.6 0 rlineto 0 -2 rlineto -3.6 0 rlineto stroke"
           \with-color #green { \postscript #" -0.5 0 moveto
                       -0.5 2 lineto
                       3 2 lineto
                       3 0 lineto
                       -0.5 0 lineto
                       closepath
                       fill
                      "
              }
\postscript #"0.2 setlinewidth 1 setlinecap 5 0 moveto 0 2 rlineto 3.6 0 rlineto 0 -2 rlineto -3.6 0 rlineto stroke"
           \with-color #cyan { \postscript #" 4.5 0 moveto
                       4.5 2 lineto
                       8 2 lineto
                       8 0 lineto
                       4.5 0 lineto
                       closepath
                       fill
                      "
} \postscript #"0.2 setlinewidth 1 setlinecap 10 0 moveto 0 2 rlineto 3.6 0 rlineto 0 -2 rlineto -3.6 0 rlineto stroke"
           \with-color #magenta { \postscript #" 9.5 0 moveto
                       9.5 2 lineto
                       13 2 lineto
                       13 0 lineto
                       9.5 0 lineto
                       closepath
                       fill
                      "
} }

\markup {"green" "cyan" "magenta" }
%%%END LY FILE%%%%%%%%





reply via email to

[Prev in Thread] Current Thread [Next in Thread]