26 static int Next_site = 0;
40 G_debug(4,
"GP_site_exists(%d)",
id);
46 for (i = 0; i < Next_site && !found; i++) {
47 if (Site_ID[i] ==
id) {
52 G_debug(3,
"GP_site_exists(): found=%d", found);
105 *numsites = Next_site;
108 ret = (
int *)
G_malloc(Next_site *
sizeof(
int));
113 for (i = 0; i < Next_site; i++) {
135 G_debug(4,
"GP_delete_site(%d)",
id);
140 for (i = 0; i < Next_site && !found; i++) {
141 if (Site_ID[i] ==
id) {
143 for (j = i; j < Next_site; j++) {
144 Site_ID[j] = Site_ID[j + 1];
176 G_debug(3,
"GP_load_site(id=%d, name=%s)",
id, filename);
212 G_debug(4,
"GP_get_sitename(%d)",
id);
231 int GP_get_style(
int id,
int *color,
int *width,
float *size,
int *symbol)
235 G_debug(4,
"GP_get_style(%d)",
id);
277 G_debug(4,
"GP_set_style(id=%d, color=%d, width=%d, size=%f, symbol=%d)",
id, color, width, size,
309 const char* size,
const char* symbol,
struct Colors *color_rules)
313 G_debug(4,
"GP_set_style_thematic(id=%d, layer=%d, color=%s, width=%s, size=%s, symbol=%s)",
id, layer,
314 color, width, size, symbol);
352 G_debug(4,
"GP_unset_style_thematic(): id=%d",
id);
380 G_debug(3,
"GP_set_zmode(%d,%d)",
id, use_z);
414 G_debug(4,
"GP_get_zmode(%d)",
id);
434 G_debug(3,
"GP_set_trans(): id=%d trans=%f,%f,%f",
435 id, xtrans, ytrans, ztrans);
465 G_debug(3,
"GP_get_trans(): id=%d, trans=%f,%f,%f",
466 id, *xtrans, *ytrans, *ztrans);
484 G_debug(3,
"GP_select_surf(%d,%d)", hp, hs);
515 G_debug(3,
"GP_unselect_surf(%d,%d)", hp, hs);
524 for (i = 0; i < gp->
n_surfs; i++) {
526 for (j = i; j < gp->
n_surfs - 1; j++) {
553 G_debug(3,
"GP_surf_is_selected(%d,%d)", hp, hs);
558 for (i = 0; i < gp->
n_surfs; i++) {
589 for (i = 0; i < gp->
n_surfs; i++) {
594 G_debug(5,
"Drawing site %d on Surf %d",
id,
611 for (
id = 0;
id < Next_site;
id++) {
684 if (strcmp(str,
"x") == 0)
686 else if (strcmp(str,
"box") == 0)
688 else if (strcmp(str,
"sphere") == 0)
690 else if (strcmp(str,
"cube") == 0)
692 else if (strcmp(str,
"diamond") == 0)
694 else if (strcmp(str,
"dec_tree") == 0)
696 else if (strcmp(str,
"con_tree") == 0)
698 else if (strcmp(str,
"aster") == 0)
700 else if (strcmp(str,
"gyro") == 0)
702 else if (strcmp(str,
"histogram") == 0)
705 G_warning(
_(
"Unknown icon marker, using \"sphere\""));
int gpd_2dsite(geosite *, geosurf *, int)
Draw 2D point set.
geosurf * gs_get_surf(int)
Get geosurf struct.
int GP_site_exists(int id)
Check if point set exists.
geosite * gp_get_new_site(void)
Create new geosite instance and add it to list.
void GP_get_trans(int id, float *xtrans, float *ytrans, float *ztrans)
Get transformation params.
int gp_set_defaults(geosite *)
Set default value for geosite struct.
int drape_surf_id[MAX_SURFS]
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_get_style(int id, int *color, int *width, float *size, int *symbol)
Get point set style.
gvstyle_thematic * tstyle
int gp_num_sites(void)
Get number of loaded point sets.
int Gp_load_sites_thematic(geosite *, struct Colors *)
Load styles for geopoints based on thematic mapping.
int GP_get_zmode(int id, int *use_z)
Get z-mode.
int GP_set_zmode(int id, int use_z)
Set z mode for point set.
void * GP_Get_ClientData(int id)
Get client data.
int GS_get_region(float *, float *, float *, float *)
Get 2D region extent.
int GP_unset_style_thematic(int id)
Make style for thematic mapping inactive.
void gp_free_sitemem(geosite *)
Free geosite (lower level)
geosite * gp_get_site(int)
Get geosite struct.
int GP_set_style(int id, int color, int width, float size, int symbol)
Set point style.
int GP_delete_site(int id)
Delete registrated point set.
int GP_surf_is_selected(int hp, int hs)
Check if surface is selected.
void GP_alldraw_site(void)
Draw all available point sets.
int GP_new_site(void)
Create new point set.
void GP_set_trans(int id, float xtrans, float ytrans, float ztrans)
Set transformation params.
int GP_get_sitename(int id, char **filename)
Get point set filename.
int GP_str_to_marker(const char *str)
Determine point marker symbol for string.
int GP_num_sites(void)
Get number of loaded point sets.
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
void G_warning(const char *,...) __attribute__((format(printf
int * GP_get_site_list(int *numsites)
Get list of point sets.
int GP_select_surf(int hp, int hs)
Select surface for given point set.
void GP_draw_site(int id)
Draw point set.
char * G_store(const char *)
Copy string to allocated memory.
void gp_delete_site(int)
Delete point set and remove from list.
int GP_load_site(int id, const char *filename)
Load point set from file.
geopoint * Gp_load_sites(const char *, int *, int *)
Load to points to memory.
int gpd_3dsite(geosite *, float, float, int)
Draw 3D point set.
int GP_Set_ClientData(int id, void *clientd)
Set client data.
int G_debug(int, const char *,...) __attribute__((format(printf
int GP_unselect_surf(int hp, int hs)
Unselect surface.