20 return late_int(obj, attr, def, INT_MIN);
29 if (!p || p[0] ==
'\0')
43 return l_int(obj,attr,def);
60 (void)sscanf(
str,
"%f,%f,%f", &p.
x, &p.
y, &p.
z);
65 const size_t npol = glCompPoly_size(selPoly);
69 for (
size_t i = 0, j = npol - 1; i < npol; j = i++) {
70 const glCompPoint pt_i = glCompPoly_get(selPoly, i);
71 const glCompPoint pt_j = glCompPoly_get(selPoly, j);
72 if (((pt_i.
y <= p.
y && p.
y < pt_j.
y) ||
73 (pt_j.
y <= p.
y && p.
y < pt_i.
y)) &&
74 p.
x < (pt_j.
x - pt_i.
x) * (p.
y - pt_i.
y) / (pt_j.
y - pt_i.
y) + pt_i.
x)
char * late_string(void *obj, attrsym_t *attr, char *defaultValue)
int late_int(void *obj, attrsym_t *attr, int defaultValue, int minimum)
bool late_bool(void *obj, attrsym_t *attr, bool defaultValue)
Agsym_t * agattr(Agraph_t *g, int kind, char *name, const char *value)
creates or looks up attributes of a graph
char * agxget(void *obj, Agsym_t *sym)
#define AGTYPE(obj)
returns AGRAPH, AGNODE, or AGEDGE depending on the type of the object
textitem scanner parser str
float getAttrFloat(Agraph_t *g, void *obj, char *attr_name, float def)
int getAttrInt(Agraph_t *g, void *obj, char *attr_name, int def)
int getAttrBool(Agraph_t *g, void *obj, char *attr_name, int def)
glCompPoint getPointFromStr(const char *str)
char * getAttrStr(Agraph_t *g, void *obj, char *attr_name, char *def)
int l_int(void *obj, Agsym_t *attr, int def)
int point_in_polygon(glCompPoly_t *selPoly, glCompPoint p)
float l_float(void *obj, Agsym_t *attr, float def)
graphs, nodes and edges info: Agraphinfo_t, Agnodeinfo_t and Agedgeinfo_t