2 |
|
/* |
3 |
|
* color.h - header for routines using pixel color values. |
4 |
|
* |
5 |
– |
* Must be included after X11 headers, since they declare a BYTE type. |
6 |
– |
* |
5 |
|
* Two color representations are used, one for calculation and |
6 |
|
* another for storage. Calculation is done with three floats |
7 |
|
* for speed. Stored color values use 4 bytes which contain |
26 |
|
#define COLXS 128 /* excess used for exponent */ |
27 |
|
#define WHT 3 /* used for RGBPRIMS type */ |
28 |
|
|
29 |
< |
#undef BYTE |
30 |
< |
#define BYTE unsigned char /* 8-bit unsigned integer */ |
29 |
> |
#undef uby8 |
30 |
> |
#define uby8 unsigned char /* 8-bit unsigned integer */ |
31 |
|
|
32 |
< |
typedef BYTE COLR[4]; /* red, green, blue (or X,Y,Z), exponent */ |
32 |
> |
typedef uby8 COLR[4]; /* red, green, blue (or X,Y,Z), exponent */ |
33 |
|
|
34 |
|
typedef float COLORV; |
35 |
|
typedef COLORV COLOR[3]; /* red, green, blue (or X,Y,Z) */ |