6 #define LOOKUP_COLORS 2048 8 static void organize_lookup(
struct Colors *,
int);
9 static int organize_fp_lookup(
struct Colors *,
int);
10 static int double_comp(
const void *,
const void *);
18 organize_lookup(colors, 0);
19 organize_lookup(colors, 1);
21 organize_fp_lookup(colors, 0);
22 organize_fp_lookup(colors, 1);
28 static int organize_fp_lookup(
struct Colors *colors,
int mod)
66 for (; rule; rule = rule->
prev) {
76 sizeof(
DCELL), &double_comp);
83 for (rule = cp->
rules; rule; rule = rule->
next)
84 if (rule->low.value <= val && val <= rule->
high.
value)
96 static void organize_lookup(
struct Colors *colors,
int mod)
120 for (i = 0; i < n; i++)
137 static int double_comp(
const void *xx,
const void *yy)
139 const DCELL *
x = xx, *y = yy;
struct _Color_Info_ fixed
struct _Color_Value_ low high
struct _Color_Rule_ * next
void Rast__organize_colors(struct Colors *colors)
void Rast__lookup_colors(const void *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *, int, int, RASTER_MAP_TYPE)
Lookup an array of colors.
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
struct _Color_Info_::@3 lookup
struct _Color_Info_ modular
struct _Color_Info_::@4 fp_lookup
struct _Color_Rule_ * prev
struct _Color_Rule_ * rules