25 #define PARENT(n) ((Agraph_t*)ND_alg(n))
40 static void initCList(
clist_t * clist)
56 if (clist->
cnt >= clist->
sz) {
60 clist->
cl[clist->
cnt] = subg;
63 static void cluster_init_graph(
graph_t * g)
105 fprintf (stderr,
"layout %s\n",
agnameof(g));
134 agerr (
AGWARN,
"Graph %s has array packing with user values but no \"sortv\" attributes are defined.",
139 children =
N_NEW(total,
void*);
144 if (pinfo.
vals && cattr) {
147 children[j++] = subg;
158 if (pinfo.
vals && vattr) {
175 for (j = 0; j < total; j++) {
213 d = p.
x - (rootbb.
UR.
x - rootbb.
LL.
x);
222 margin = pinfo.
margin/2.0;
225 rootbb.
LL.
x -= margin;
226 rootbb.
UR.
x += margin;
232 fprintf (stderr,
"%s : %f %f %f %f\n",
agnameof(g), rootbb.
LL.
x, rootbb.
LL.
y, rootbb.
UR.
x, rootbb.
UR.
y);
239 for (j = 0; j < total; j++) {
243 bb.
LL = sub_pointf(bb.
LL, rootbb.
LL);
244 bb.
UR = sub_pointf(bb.
UR, rootbb.
LL);
261 rootbb.
UR = sub_pointf(rootbb.
UR, rootbb.
LL);
262 rootbb.
LL = sub_pointf(rootbb.
LL, rootbb.
LL);
267 fprintf (stderr,
"%s : %f %f %f %f\n",
agnameof(g), rootbb.
LL.
x, rootbb.
LL.
y, rootbb.
UR.
x, rootbb.
UR.
y);
285 fprintf (stderr,
"reposition %s\n",
agnameof(g));
317 reposition (subg, depth+1);
329 if (pclist ==
NULL) {
337 if (!strncmp(
agnameof(subg),
"cluster", 7)) {
340 addCluster(clist, subg);
341 mkClusters(subg,
NULL, subg);
344 mkClusters(subg, clist, parent);
347 if (pclist ==
NULL) {
356 cluster_init_graph(g);
357 mkClusters(g,
NULL, g);
376 static void cleanup_graphs (
Agraph_t *g)
384 cleanup_graphs (subg);
void dotneato_postprocess(Agraph_t *g)
void free_label(textlabel_t *p)
#define RALLOC(size, ptr, type)
Agsym_t * agattr(Agraph_t *g, int kind, char *name, char *value)
bool layout(Agraph_t *g, const char *engine)
void osage_cleanup(Agraph_t *g)
int agerr(agerrlevel_t level, const char *fmt,...)
CGRAPH_API Agraph_t * agfstsubg(Agraph_t *g)
pack_mode getPackInfo(Agraph_t *g, pack_mode dflt, int dfltMargin, pack_info *pinfo)
CGRAPH_API Agedge_t * agfstout(Agraph_t *g, Agnode_t *n)
#define PS2INCH(a_points)
CGRAPH_API Agraph_t * agnxtsubg(Agraph_t *subg)
void spline_edges0(Agraph_t *, boolean)
CGRAPH_API Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
CGRAPH_API char * agnameof(void *)
point * putRects(int ng, boxf *bbs, pack_info *pinfo)
CGRAPH_API Agnode_t * agfstnode(Agraph_t *g)
int late_int(void *obj, attrsym_t *attr, int def, int low)
EXTERN unsigned char Verbose
void gv_cleanup_node(Agnode_t *n)
CGRAPH_API int agnnodes(Agraph_t *g)
void osage_layout(Agraph_t *g)
CGRAPH_API void * agbindrec(void *obj, char *name, unsigned int size, int move_to_front)
int common_init_edge(edge_t *e)
void setEdgeType(graph_t *g, int dflt)
void neato_init_node(node_t *n)
int spline_edges1(graph_t *g, int)
CGRAPH_API Agedge_t * agnxtout(Agraph_t *g, Agedge_t *e)