}
}
-static void normalize(graph_t * g)
+/* normalize:
+ * If normalize is set, move first node to origin, then
+ * rotate graph so that first edge is horizontal.
+ * FIX: Generalize to allow rotation determined by graph shape.
+ */
+void normalize(graph_t * g)
{
node_t *v;
edge_t *e;
return adjustMode + 1;
}
-void adjustNodes(graph_t * G)
+void removeOverlap(graph_t * G)
{
/* int userWindow = 0; */
char *flag;
if (agnnodes(G) < 2)
return;
- normalize(G);
flag = agget(G, "overlap");
if (flag == NULL)
return;
/* fprintf (stderr, "old scale %.4f sec\n", elapsed_sec()); */
}
+
+void adjustNodes(graph_t * G)
+{
+ if (agnnodes(G) < 2)
+ return;
+ normalize(G);
+ removeOverlap (G);
+}
+