128 G_warning(
_(
"Invalid color (%s), using \"white\" as default"),
130 red = grn = blu = 255;
149 int id,
unsigned long color,
150 double elev,
int nw,
int ne,
int sw,
int se)
193 int id,
unsigned long color,
194 double elev,
int nw,
int ne,
int sw,
int se)
225 elev, nw, ne, sw, se);
252 int sx,
int sy,
float size,
256 int *surf_list, num_surfs;
281 arw->
where[0] = coords[0];
282 arw->
where[1] = coords[1];
283 arw->
where[2] = coords[2];
335 int bar_id,
float *coords,
float size,
345 s->
where[0] = coords[0];
346 s->
where[1] = coords[1];
347 s->
where[2] = coords[2];
369 int sx,
int sy,
float size,
373 int *surf_list, num_surfs;
390 if (s->
id == bar_id) {
393 s->
where[0] = coords[0];
394 s->
where[1] = coords[1];
395 s->
where[2] = coords[2];
438 if (bar_id < data->num_scalebars && data->
scalebar[bar_id] !=
NULL) {
int G_str_to_color(const char *, int *, int *, int *)
Parse color string and set red,green,blue.
void G_free(void *)
Free allocated memory.
void G_warning(const char *,...) __attribute__((format(printf
int Nviz_off_cplane(nv_data *, int)
Turn off (make inactive) the given clip plane.
int Nviz_new_cplane(nv_data *, int)
Creates a clip plane object.
int Nviz_new_light(nv_data *)
Define new light.
int * GS_get_surf_list(int *)
Get surface list.
void GS_set_Narrow(int *, int, float *)
Set decoration, north arrow ??
int GS_num_surfs(void)
Get number of surfaces.
void GS_set_light_reset(int)
int gsd_north_arrow(float *, float, GLuint, unsigned long, unsigned long)
Draw North Arrow takes OpenGL coords and size.
int gsd_scalebar_v2(float *, float, GLuint, unsigned long, unsigned long)
Draw Scalebar (as lines)
void GS_draw_fringe(int, unsigned long, float, int *)
Draw fringe around data (surface) at selected corners.
int Nviz_get_bgcolor(nv_data *data)
Get background color.
void Nviz_delete_arrow(nv_data *data)
Deletes the North Arrow.
struct fringe_data * Nviz_new_fringe(nv_data *data, int id, unsigned long color, double elev, int nw, int ne, int sw, int se)
void Nviz_init_data(nv_data *data)
Initialize Nviz data.
int Nviz_draw_arrow(nv_data *data)
Draws the North Arrow.
void Nviz_delete_scalebar(nv_data *data, int bar_id)
Deletes scale bar.
void Nviz_draw_scalebar(nv_data *data)
Draws the Scale bar.
struct scalebar_data * Nviz_set_scalebar(nv_data *data, int bar_id, int sx, int sy, float size, unsigned int color)
Sets the scale bar position and return world coords.
struct fringe_data * Nviz_set_fringe(nv_data *data, int id, unsigned long color, double elev, int nw, int ne, int sw, int se)
int Nviz_set_arrow(nv_data *data, int sx, int sy, float size, unsigned int color)
Sets the North Arrow position and return world coords.
void Nviz_set_bgcolor(nv_data *data, int color)
Set background color.
int Nviz_color_from_str(const char *color_str)
Get color value from color string (name or RGB triplet)
void Nviz_destroy_data(nv_data *data)
Free allocated space by nv_data struct.
void Nviz_draw_fringe(nv_data *data)
struct scalebar_data * Nviz_new_scalebar(nv_data *data, int bar_id, float *coords, float size, unsigned int color)
struct scalebar_data ** scalebar
struct fringe_data ** fringe
struct arrow_data * arrow