From: erg Date: Fri, 29 Jul 2005 22:59:35 +0000 (+0000) Subject: Simplify dotneato_postprocess interface; X-Git-Tag: LAST_LIBGRAPH~32^2~7346 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d75f8bbbdfcdbe55d585935c0506e04d39369272;p=graphviz Simplify dotneato_postprocess interface; remove unnecessary nodesize functions for circo and twopi; initialize layout state in graph_init so that it will be initialized anew for each layout; move aspect ratio and copying of coords from ND_pos to ND_coord out of neato spline code; adopt convention that if the splines attribute is set to "", no splines are generated. --- diff --git a/lib/twopigen/twopiinit.c b/lib/twopigen/twopiinit.c index a037b30c5..c22fcae18 100644 --- a/lib/twopigen/twopiinit.c +++ b/lib/twopigen/twopiinit.c @@ -25,21 +25,11 @@ #include "pack.h" #include "neatoprocs.h" - -void twopi_nodesize(node_t * n, boolean flip) -{ - int w; - - w = ND_xsize(n) = POINTS(ND_width(n)); - ND_lw_i(n) = ND_rw_i(n) = w / 2; - ND_ht_i(n) = ND_ysize(n) = POINTS(ND_height(n)); -} - static void twopi_init_node(node_t * n) { common_init_node(n); - twopi_nodesize(n, GD_flip(n->graph)); + neato_nodesize(n, GD_flip(n->graph)); ND_pos(n) = ALLOC(GD_ndim(n->graph), 0, double); ND_alg(n) = (void *) NEW(rdata); } @@ -130,7 +120,7 @@ void twopi_layout(Agraph_t * g) } free(ccs); } - dotneato_postprocess(g, twopi_nodesize); + dotneato_postprocess(g); }