36 long count, total, sum;
71 x = min + (max -
min) * (sum + count / 2.0) / total;
76 if (!first && red2 == red && blu2 == blu && grn2 == grn)
81 &cat, red2, grn2, blu2,
92 if (!first && cat > prev)
94 &cat, red2, grn2, blu2,
114 int red2, grn2, blu2;
136 for (i = 0; i <= statf->
count; i++) {
143 val2 = exp(val2) - 1;
146 x = min + (max -
min) * sum / statf->
total;
149 if (i < statf->
count)
150 sum += statf->
stats[i];
152 if (!first && red2 == red && blu2 == blu && grn2 == grn)
157 &val2, red2, grn2, blu2,
162 if (i == statf->
count)
171 if (!first && val2 > val)
173 &val2, red2, grn2, blu2,
188 double delta, lmin, lmax;
201 lmin = log(min + delta);
202 lmax = log(max + delta);
215 for (i = 0; i <= samples; i++) {
216 int red2, grn2, blu2;
220 y = min + (max -
min) * i / samples;
225 else if (i == samples)
228 lx = lmin + (lmax - lmin) * i / samples;
235 &x, red2, grn2, blu2, dst);
256 double absmin, absmax, amin, amax, delta, lamin, lamax;
267 amin =
MIN(absmin, absmax);
268 amax =
MAX(absmin, absmax);
270 if (min * max <= 0.0) {
275 lamin = log(amin + delta);
276 lamax = log(amax + delta);
290 for (i = 0; i <= samples; i++) {
291 int red2, grn2, blu2;
295 y = min + (max -
min) * i / samples;
300 else if (i == samples)
303 lx = lamin + (lamax - lamin) * i / samples;
312 &x1, red2, grn2, blu2, dst);
316 &x1, red2, grn2, blu2, dst);
int Rast_next_cell_stat(CELL *, long *, struct Cell_stats *)
Retrieve sorted cell stats.
int Rast_rewind_cell_stats(struct Cell_stats *)
Reset/rewind cell stats.
void Rast_add_c_color_rule(const CELL *, int, int, int, const CELL *, int, int, int, struct Colors *)
Adds the integer color rule (CELL version)
void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *)
Get color range values (DCELL)
void Rast_get_default_color(int *, int *, int *, const struct Colors *)
Gets default color.
void Rast_get_null_value_color(int *, int *, int *, const struct Colors *)
Gets color for null value.
void Rast_set_default_color(int, int, int, struct Colors *)
Set default color value.
void Rast_set_null_value_color(int, int, int, struct Colors *)
Set color for NULL-value.
int Rast_get_d_color(const DCELL *, int *, int *, int *, struct Colors *)
Gets color from raster map (DCELL)
void Rast_add_d_color_rule(const DCELL *, int, int, int, const DCELL *, int, int, int, struct Colors *)
Adds the floating-point color rule (DCELL version)
void Rast_init_colors(struct Colors *)
Initialize color structure.
struct _Color_Rule_ * prev