27 static int Next_site = 0;
41 G_debug(4,
"GP_site_exists(%d)",
id);
47 for (i = 0; i < Next_site && !found; i++) {
48 if (Site_ID[i] ==
id) {
53 G_debug(3,
"GP_site_exists(): found=%d", found);
106 *numsites = Next_site;
109 ret = (
int *)
G_malloc(Next_site *
sizeof(
int));
114 for (i = 0; i < Next_site; i++) {
136 G_debug(4,
"GP_delete_site(%d)",
id);
141 for (i = 0; i < Next_site && !found; i++) {
142 if (Site_ID[i] ==
id) {
144 for (j = i; j < Next_site; j++) {
145 Site_ID[j] = Site_ID[j + 1];
177 G_debug(3,
"GP_load_site(id=%d, name=%s)",
id, filename);
213 G_debug(4,
"GP_get_sitename(%d)",
id);
236 int GP_get_style(
int id,
int *color,
int *width,
float *size,
int *symbol)
240 G_debug(4,
"GP_get_style(%d)",
id);
282 G_debug(4,
"GP_set_style(id=%d, color=%d, width=%d, size=%f, symbol=%d)",
283 id, color, width, size, symbol);
314 const char *width,
const char *size,
315 const char *symbol,
struct Colors *color_rules)
320 "GP_set_style_thematic(id=%d, layer=%d, color=%s, width=%s, "
321 "size=%s, symbol=%s)",
322 id, layer, color, width, size, symbol);
360 G_debug(4,
"GP_unset_style_thematic(): id=%d",
id);
388 G_debug(3,
"GP_set_zmode(%d,%d)",
id, use_z);
422 G_debug(4,
"GP_get_zmode(%d)",
id);
442 G_debug(3,
"GP_set_trans(): id=%d trans=%f,%f,%f",
id, xtrans, ytrans,
473 G_debug(3,
"GP_get_trans(): id=%d, trans=%f,%f,%f",
id, *xtrans, *ytrans,
492 G_debug(3,
"GP_select_surf(%d,%d)", hp, hs);
523 G_debug(3,
"GP_unselect_surf(%d,%d)", hp, hs);
532 for (i = 0; i < gp->
n_surfs; i++) {
534 for (j = i; j < gp->
n_surfs - 1; j++) {
561 G_debug(3,
"GP_surf_is_selected(%d,%d)", hp, hs);
566 for (i = 0; i < gp->
n_surfs; i++) {
597 for (i = 0; i < gp->
n_surfs; i++) {
602 G_debug(5,
"Drawing site %d on Surf %d",
id,
619 for (
id = 0;
id < Next_site;
id++) {
692 if (strcmp(str,
"x") == 0)
694 else if (strcmp(str,
"box") == 0)
696 else if (strcmp(str,
"sphere") == 0)
698 else if (strcmp(str,
"cube") == 0)
700 else if (strcmp(str,
"diamond") == 0)
702 else if (strcmp(str,
"dec_tree") == 0)
704 else if (strcmp(str,
"con_tree") == 0)
706 else if (strcmp(str,
"aster") == 0)
708 else if (strcmp(str,
"gyro") == 0)
710 else if (strcmp(str,
"histogram") == 0)
713 G_warning(
_(
"Unknown icon marker, using \"sphere\""));
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
void G_warning(const char *,...) __attribute__((format(printf
int G_debug(int, const char *,...) __attribute__((format(printf
char * G_store(const char *)
Copy string to allocated memory.
int GS_get_region(float *, float *, float *, float *)
Get 2D region extent.
geosite * gp_get_new_site(void)
Create new geosite instance and add it to list.
int gpd_3dsite(geosite *, float, float, int)
Draw 3D point set.
int gp_set_defaults(geosite *)
Set default value for geosite struct.
void gp_free_sitemem(geosite *)
Free geosite (lower level)
geosite * gp_get_site(int)
Get geosite struct.
geopoint * Gp_load_sites(const char *, int *, int *)
Load to points to memory.
int gpd_2dsite(geosite *, geosurf *, int)
Draw 2D point set.
int gp_num_sites(void)
Get number of loaded point sets.
void gp_delete_site(int)
Delete point set and remove from list.
geosurf * gs_get_surf(int)
Get geosurf struct.
int Gp_load_sites_thematic(geosite *, struct Colors *)
Load styles for geopoints based on thematic mapping.
int GP_select_surf(int hp, int hs)
Select surface for given point set.
int GP_delete_site(int id)
Delete registered point set.
int GP_new_site(void)
Create new point set.
void GP_get_trans(int id, float *xtrans, float *ytrans, float *ztrans)
Get transformation params.
int GP_get_zmode(int id, int *use_z)
Get z-mode.
int GP_get_sitename(int id, char **filename)
Get point set filename.
int GP_set_zmode(int id, int use_z)
Set z mode for point set.
int GP_load_site(int id, const char *filename)
Load point set from file.
void GP_set_trans(int id, float xtrans, float ytrans, float ztrans)
Set transformation params.
int GP_Set_ClientData(int id, void *clientd)
Set client data.
int GP_site_exists(int id)
Check if point set exists.
int GP_str_to_marker(const char *str)
Determine point marker symbol for string.
void * GP_Get_ClientData(int id)
Get client data.
int GP_get_style(int id, int *color, int *width, float *size, int *symbol)
Get point set style.
int * GP_get_site_list(int *numsites)
Get list of point sets.
int GP_surf_is_selected(int hp, int hs)
Check if surface is selected.
int GP_num_sites(void)
Get number of loaded point sets.
void GP_draw_site(int id)
Draw point set.
void GP_alldraw_site(void)
Draw all available point sets.
int GP_unselect_surf(int hp, int hs)
Unselect surface.
int GP_set_style_thematic(int id, int layer, const char *color, const char *width, const char *size, const char *symbol, struct Colors *color_rules)
Set point set style for thematic mapping.
int GP_set_style(int id, int color, int width, float size, int symbol)
Set point style.
int GP_unset_style_thematic(int id)
Make style for thematic mapping inactive.
OGSF header file (structures)
gvstyle_thematic * tstyle
thematic mapping
gvstyle * style
points default look&feel
Struct for vector map (thematic mapping)
int symbol
Point symbol/line type.