88 if ((
s =
agget(g,
"root"))) {
92 agwarningf(
"specified root node \"%s\" was not found.",
s);
93 agerr(
AGPREV,
"Using default calculation for root node\n");
105 if ((
s =
agget(g,
"scale")) && *
s) {
106 if ((r = sscanf (
s,
"%lf,%lf",&sc.
x,&sc.
y))) {
107 if (r == 1) sc.
y = sc.
x;
123 else if (!rootattr || !(lctr =
findRootNode(g, rootattr)))
128 if (setLocalRoot && !lctr)
129 agxset (c, rootattr,
"1");
140 for (
size_t i = 0; i < ncc; i++) {
144 else if (!rootattr || !(lctr =
findRootNode(sg, rootattr)))
150 if (setLocalRoot && (!lctr || (lctr == ctr)))
151 agxset (c, rootattr,
"1");
160 for (
size_t i = 0; i < ncc; i++) {
int adjustNodes(graph_t *G)
Memory allocation wrappers that exit on failure.
static void * gv_calloc(size_t nmemb, size_t size)
abstract graph C library, Cgraph API
Agnode_t * circleLayout(Agraph_t *sg, Agnode_t *center)
bool mapbool(const char *p)
void setEdgeType(graph_t *g, int defaultValue)
double late_double(void *obj, attrsym_t *attr, double defaultValue, double minimum)
void common_init_edge(edge_t *e)
int agnnodes(Agraph_t *g)
size_t graphviz_node_induce(Agraph_t *g, Agraph_t *edgeset)
Agsym_t * agattr(Agraph_t *g, int kind, char *name, const char *value)
creates or looks up attributes of a graph
int agset(void *obj, char *name, const char *value)
int agxset(void *obj, Agsym_t *sym, const char *value)
char * agget(void *obj, char *name)
char * agxget(void *obj, Agsym_t *sym)
Agedge_t * agfstout(Agraph_t *g, Agnode_t *n)
Agedge_t * agnxtout(Agraph_t *g, Agedge_t *e)
void agwarningf(const char *fmt,...)
int agerr(agerrlevel_t level, const char *fmt,...)
#define GD_neato_nlist(g)
Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
Agnode_t * agfstnode(Agraph_t *g)
char * agnameof(void *)
returns a string descriptor for the object.
int agdelete(Agraph_t *g, void *obj)
deletes object. Equivalent to agclose, agdelnode, and agdeledge for obj being a graph,...
int agcontains(Agraph_t *, void *obj)
returns non-zero if obj is a member of (sub)graph
Agraph_t * agroot(void *obj)
void * agbindrec(void *obj, const char *name, unsigned int recsize, int move_to_front)
attaches a new record of the given size to the object
Agraph_t ** ccomps(Agraph_t *g, size_t *ncc, char *pfx)
void neato_init_node(node_t *n)
NEATOPROCS_API void spline_edges(Agraph_t *)
int packSubgraphs(size_t ng, Agraph_t **gs, Agraph_t *root, pack_info *info)
pack_mode getPackInfo(Agraph_t *g, pack_mode dflt, int dfltMargin, pack_info *pinfo)
support for connected components
void dotneato_postprocess(Agraph_t *g)
void gv_cleanup_edge(Agedge_t *e)
void gv_cleanup_node(Agnode_t *n)
bool doSplines
use splines in constructing graph shape
static void twopi_init_edge(edge_t *e)
static Agnode_t * findRootNode(Agraph_t *sg, Agsym_t *rootattr)
static void twopi_init_node_edge(graph_t *g)
void twopi_layout(Agraph_t *g)
static void twopi_cleanup_graph(graph_t *g)
void twopi_cleanup(graph_t *g)
void twopi_init_graph(graph_t *g)