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

Color Text on CAD Buffer II



    Date: Sat, 29 Sep 90 10:12 EDT
    From: pan@Athena.Pangaro.Dialnet.Symbolics.Com (Paul Pangaro)

    It seems like a simple request: I want to output lines of text in different colors,
    depending on their importance to the user: red for critical, yellow for important, etc.

    However the color documentation is a maze of non-indexed, elliptical stuff about ALUs,
    char-alus, sc-fill-alus and so forth. I have played around for half an hour but without
    seeming to get anywhere, and certainly not with colored text. If I had time, I too could 
    become expert at it, but instead I ask the experts: anyone have a simple way to do
    multi- or vary-colored text, without blowing away the usual background/foreground colors?
    Thanks.

The simplest is in this case would be 
(graphics:draw-string string x y :color :red :stream stream).
The :color parameter can be :red, :green, :blue, :yellow, :magenta, :cyan, :black, :white, 
or (r g b), where each value is between 0 and 1.

The functions which take sc-alu argument allows you much finer (and more efficient) control 
of effects such as protecting background, clearing overlay planes, etc.