]> granicus.if.org Git - graphviz/commitdiff
Fix bug in neato -n2. When translating the graph to the origin, we were
authorellson <devnull@localhost>
Tue, 18 Oct 2005 21:13:47 +0000 (21:13 +0000)
committerellson <devnull@localhost>
Tue, 18 Oct 2005 21:13:47 +0000 (21:13 +0000)
using the same offset for nodes and edges, but edge control points are
always in point units, so the translation for splines should use GD_bb.LL.

lib/neatogen/neatoinit.c

index a58c61fa3eea57b361e46a15d702a91eca1564d0..23b380d0be0d6bcb8fd5b79b41c46feaf4c2f6bb 100644 (file)
@@ -442,7 +442,7 @@ nop_init_graphs(Agraph_t * g, attrsym_t * G_lp, attrsym_t * G_bb)
  * Translate edge by offset.
  * Assume ED_spl(e) != NULL
  */
-static void translateE(edge_t * e, pointf offset)
+static void translateE(edge_t * e, point offset)
 {
     int i, j;
     point *pt;
@@ -518,7 +518,7 @@ static void translate(Agraph_t * g, pos_edge posEdges)
        for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
            for (e = agfstout(g, n); e; e = agnxtout(g, e))
                if (ED_spl(e))
-                   translateE(e, offset);
+                   translateE(e, GD_bb(g).LL);
        }
     }
     translateG(g, GD_bb(g).LL);