]> granicus.if.org Git - graphviz/commitdiff
Simplify dotneato_postprocess interface;
authorerg <devnull@localhost>
Fri, 29 Jul 2005 22:59:35 +0000 (22:59 +0000)
committererg <devnull@localhost>
Fri, 29 Jul 2005 22:59:35 +0000 (22:59 +0000)
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.

lib/twopigen/twopiinit.c

index a037b30c57515d4ba0bc53ada845ba449e4bfc4e..c22fcae18e0441c3766d174f90944e2a9ca79857 100644 (file)
 #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);
 
 }