[gtk-list] Adding support for 4 bit color




The code for visuals is in gdkvisuals.c.  There's an array of possible
depths, called possible_depths, and you would need to add 4 to that (and
add one to npossible_depths).  Also, you would probably need to edit
gdk_init_visuals -- it ranks the best visuals for a depth, and for 8 bit
color, it chooses GDK_PSEUDO_COLOR, otherwise it chooses GDK_TRUE_COLOR.
Presumably for 4 bit color, GDK_PSEUDO_COLOR is also the best choice.  Let
me know if you have any problems.

I've wondered why GDK only supports certain depths:  1, 8, 15, 16, 24 (I
think).  Are other video cards or X displays that don't have at least 8
bit color rare?

Walt




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