26#if defined(OPENGL_X11) || defined(OPENGL_WINDOWS)
29#elif defined(OPENGL_AQUA)
31#include <OpenGL/glu.h>
41static float *Listcats;
42static int Listnum = 0;
162 while (.5 *
newnum > *num) {
173 while (2 *
newnum <= *num) {
237 if (mapset ==
NULL) {
245 G_warning(
_(
"Unable to read color file of raster map <%s>"),
name);
251 G_warning(
_(
"Unable to read category file of raster map <%s>"),
256 if (flags[4] &&
rangef[0] != -9999. &&
rangef[1] != -9999.) {
267 G_warning(
_(
"Unable to read fp range of raster map <%s>"),
272 if (flags[4] &&
rangef[0] != -9999.)
274 if (flags[4] &&
rangef[1] != -9999.)
283 if (flags[4] &&
rangef[0] != -9999.)
285 if (flags[4] &&
rangef[1] != -9999.)
293 G_warning(
_(
"Range request error for legend"));
316 for (tmp = 1; tmp <
max; tmp *= 10,
p1++)
319 for (tmp = -1; tmp >
min; tmp *= 10, p2++)
381 if (
is_fp && !Listnum) {
383 G_warning(
_(
"Unable to show discrete FP range (use list)"));
400 for (k = 0; k <
numlabs; k++) {
502 G_warning(
_(
"Too many categories to show as discrete!"));
508 for (k = 0, i = 0; k <
lleg; k++) {
602 for (k = 0; k < i; k++) {
613 for (k = 0; k <
numlabs; k++) {
void G_free(void *)
Free allocated memory.
void G_warning(const char *,...) __attribute__((format(printf
const char * G_find_raster2(const char *, const char *)
Find a raster map (look but don't touch)
void gsd_endlist(void)
End list.
void gsd_pushmatrix(void)
Push the current matrix stack.
void GS_set_draw(int)
Sets which buffer to draw to.
void do_label_display(GLuint, float *, const char *)
Display label.
void gsd_bgnlist(int, int)
ADD.
int gsd_makelist(void)
ADD.
int gsd_get_txtwidth(const char *, int)
Get text width.
int gsd_get_txtheight(int size)
Get text height.
void gsd_color_func(unsigned int)
Set current color.
void gsd_popmatrix(void)
Pop the current matrix stack.
int get_txtxoffset(void)
Get text offset.
void gsd_linewidth(short)
Set width of rasterized lines.
void gsd_endline(void)
End line.
void gsd_colormode(int)
Set color mode.
void gsd_bgnline(void)
Begin line.
void GS_done_draw(void)
Draw done, swap buffers.
void Rast_free_cats(struct Categories *)
Free category structure memory.
int Rast_get_c_color(const CELL *, int *, int *, int *, struct Colors *)
Gets color from raster map (CELL)
int Rast_read_colors(const char *, const char *, struct Colors *)
Read color table of raster map.
int Rast_read_cats(const char *, const char *, struct Categories *)
Read raster category file.
int Rast_read_fp_range(const char *, const char *, struct FPRange *)
Read floating-point range.
void Rast_free_colors(struct Colors *)
Free color structure memory.
void Rast_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *)
Get minimum and maximum value from fp range.
char * Rast_get_c_cat(CELL *, struct Categories *)
Get a raster category label (CELL)
void Rast_get_range_min_max(const struct Range *, CELL *, CELL *)
Get range min and max.
int Rast_read_range(const char *, const char *, struct Range *)
Read raster range (CELL)
int Rast_map_is_fp(const char *, const char *)
Check if raster map is floating-point.
int Rast_get_d_color(const DCELL *, int *, int *, int *, struct Colors *)
Gets color from raster map (DCELL)
char * Rast_get_d_cat(DCELL *, struct Categories *)
Get a raster category label (DCELL)
int gsd_make_nice_number(float *num)
ADD.
GLuint gsd_put_legend(const char *name, GLuint fontbase, int size, int *flags, float *rangef, int *pt)
Put legend.
int gsd_get_nice_range(float lownum, float highnum, int numvals, float *vals)
ADD.
void gsd_end_legend_viewport(void)
ADD.
void gsd_bgn_legend_viewport(GLint wl, GLint wb, GLint wr, GLint wt)
ADD.
OGSF header file (structures)
#define RGB_TO_INT(r, g, b, i)