[gtk-list] Adding support for 4 bit color
- From: Walt Pohl <pohl math washington edu>
- To: gtk-list redhat com
- Subject: [gtk-list] Adding support for 4 bit color
- Date: Wed, 1 Jul 1998 14:29:52 -0700 (PDT)
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]