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

Re: Text Color w/ DrawChar()



In article <517qkk$ql1@engr.orst.edu>, Day Evan <day@porter.CS.ORST.EDU> wrote:
>If I change the foreground color to
>anything else, (yellow, blue, green640, or red640), any text printed shows
>up in black, i.e. invisible.

The constants "yellow", "blue", "green640", and "red640" are "master"
colors; they are intended to be used in a color palette.  SetForeColor
takes an _index_ into a color palette -- in 640 mode, only the numbers 0,
1, 2, and 3 have meaning.  SetForeColor(0) is black and SetForeColor (3)
is white, only because each of the four "minipalettes"  usually have black
(#$000) and white (#$FFF) at those indices. 

If you are using pure colors (i.e., each of the four minipalettes are the
same), then SetForeColor(1) and SetForeColor(2) will set the text color 
to the corresponding master color in the color palette.

If you want to use dithered colors, SetForeColor is pretty useless, you 
will need to do more work, and the results will be unsatisfying in many 
cases.

--Leif