]> granicus.if.org Git - graphviz/commitdiff
n->u.lw, n->u.rw, n->u.ht -> double
authorellson <devnull@localhost>
Thu, 11 Sep 2008 03:56:50 +0000 (03:56 +0000)
committerellson <devnull@localhost>
Thu, 11 Sep 2008 03:56:50 +0000 (03:56 +0000)
ND_lw_i -> ND_lw
ND_rw_i -> ND_rw
ND_ht_i -> ND_ht

24 files changed:
cmd/tools/gvpack.c
lib/common/diagen.c
lib/common/emit.c
lib/common/output.c
lib/common/postproc.c
lib/common/shapes.c
lib/common/splines.c
lib/common/types.h
lib/common/utils.c
lib/dotgen/class2.c
lib/dotgen/cluster.c
lib/dotgen/dotprocs.h
lib/dotgen/dotsplines.c
lib/dotgen/fastgr.c
lib/dotgen/flat.c
lib/dotgen/position.c
lib/dotgen/rank.c
lib/dotgen/sameport.c
lib/fdpgen/layout.c
lib/neatogen/neatosplines.c
lib/pack/ptest.c
lib/patchwork/patchwork.c
plugin/core/gvrender_core_dia.c
plugin/gd/gvrender_gd_vrml.c

index 578afbf20972c91e2cd6ca48e2924e2397a6cac0..8dde34136e64417600c0bf00fd04168fdca4d2ec 100644 (file)
@@ -301,10 +301,10 @@ static void cloneNode(Agnode_t * old, Agnode_t * new)
     ND_coord(new).x = POINTS(ND_pos(old)[0]);
     ND_coord(new).y = POINTS(ND_pos(old)[1]);
     ND_height(new) = ND_height(old);
-    ND_ht_i(new) = ND_ht_i(old);
+    ND_ht(new) = ND_ht(old);
     ND_width(new) = ND_width(old);
-    ND_lw_i(new) = ND_lw_i(old);
-    ND_rw_i(new) = ND_rw_i(old);
+    ND_lw(new) = ND_lw(old);
+    ND_rw(new) = ND_rw(old);
     ND_shape(new) = ND_shape(old);
     ND_shape_info(new) = ND_shape_info(old);
 }
index 2a422619e3310494f9281d7b31c6bf49cb00e7ca..6c4757f562a1bccfe95f8212e5e3116337bd07d7 100644 (file)
@@ -704,8 +704,8 @@ int box_connection(node_t * n, pointf p)
        A = ALLOC(A_size, A, pointf);
     }
 
-    xsize = (ND_lw_i(n) + ND_rw_i(n)) / POINTS(ND_width(n));
-    ysize = (ND_ht_i(n)) / POINTS(ND_height(n));
+    xsize = (ND_lw(n) + ND_rw(n)) / POINTS(ND_width(n));
+    ysize = (ND_ht(n)) / POINTS(ND_height(n));
 
     for (j = 0; j < peripheries; j++) {
        for (i = 0; i < sides; i++) {
index 37703b2ba7be22a13eb3f11f88884a96ee619970..ad6b0a4f9e7f93c37c1ddc565dcdf2be93963ee0 100644 (file)
@@ -1152,10 +1152,10 @@ static void emit_begin_node(GVJ_t * job, node_t * n)
             obj->url_map_shape = MAP_RECTANGLE;
             nump = 2;
             p = N_NEW(nump, pointf);
-            p[0].x = coord.x - ND_lw_i(n);
-            p[0].y = coord.y - (ND_ht_i(n) / 2);
-            p[1].x = coord.x + ND_rw_i(n);
-            p[1].y = coord.y + (ND_ht_i(n) / 2);
+            p[0].x = coord.x - ND_lw(n);
+            p[0].y = coord.y - (ND_ht(n) / 2);
+            p[1].x = coord.x + ND_rw(n);
+            p[1].y = coord.y + (ND_ht(n) / 2);
         }
         if (! (flags & GVRENDER_DOES_TRANSFORM))
             gvrender_ptf_A(job, p, p, nump);
@@ -2723,10 +2723,10 @@ static void init_bb_node(graph_t *g, node_t *n)
 {
     edge_t *e;
 
-    ND_bb(n).LL.x = ND_coord(n).x - ND_lw_i(n);
-    ND_bb(n).LL.y = ND_coord(n).y - ND_ht_i(n) / 2.;
-    ND_bb(n).UR.x = ND_coord(n).x + ND_rw_i(n);
-    ND_bb(n).UR.y = ND_coord(n).y + ND_ht_i(n) / 2.;
+    ND_bb(n).LL.x = ND_coord(n).x - ND_lw(n);
+    ND_bb(n).LL.y = ND_coord(n).y - ND_ht(n) / 2.;
+    ND_bb(n).UR.x = ND_coord(n).x + ND_rw(n);
+    ND_bb(n).UR.y = ND_coord(n).y + ND_ht(n) / 2.;
 
     for (e = agfstout(g, n); e; e = agnxtout(g, e))
         init_bb_edge(e);
index 123faa8126f339c70a9c4987095dcdea6b4dbd5d..c1d694ca0b479826fa689da26c7b2b8bf59321b0 100644 (file)
@@ -215,9 +215,9 @@ void attach_attrs_and_arrows(graph_t* g, int* sp, int* ep)
            sprintf(buf, "%.3g,%.3g", ND_coord(n).x, YDIR(ND_coord(n).y));
        }
        agset(n, "pos", buf);
-       sprintf(buf, "%.3g", PS2INCH(ND_ht_i(n)));
+       sprintf(buf, "%.3g", PS2INCH(ND_ht(n)));
        agxset(n, N_height->index, buf);
-       sprintf(buf, "%.3g", PS2INCH(ND_lw_i(n) + ND_rw_i(n)));
+       sprintf(buf, "%.3g", PS2INCH(ND_lw(n) + ND_rw(n)));
        agxset(n, N_width->index, buf);
        if (strcmp(ND_shape(n)->name, "record") == 0) {
            set_record_rects(n, ND_shape_info(n), &xb);
index 46913bb14f07aca21394139b0233311796e49c67..9aee60d8f5726f5d0512517b561cec905809f71d 100644 (file)
@@ -153,13 +153,13 @@ void dot_nodesize(node_t * n, boolean flip)
        x = ND_height(n);
     }
     ps = POINTS(x) / 2;
-    if (ps < 1)
-       ps = 1;
-    ND_lw_i(n) = ND_rw_i(n) = ps;
+    if (ps < 1) ps = 1;
+    ND_lw(n) = ND_rw(n) = ps;
+
     if (x == y)
-       ND_ht_i(n) = 2*ps;
+       ND_ht(n) = 2*ps;
     else
-       ND_ht_i(n) = POINTS(y);
+       ND_ht(n) = POINTS(y);
 }
 
 /* translate_drawing:
index 51f3410fc96590accf2f3b8dbdd6f7665bed41fe..fb39becb408f52f0c40fc7c66bad0f555013eae7 100644 (file)
@@ -351,8 +351,8 @@ static void Mcircle_hack(GVJ_t * job, node_t * n)
 
     y = .7500;
     x = .6614;                 /* x^2 + y^2 = 1.0 */
-    p.y = y * ND_ht_i(n) / 2.0;
-    p.x = ND_rw_i(n) * x;      /* assume node is symmetric */
+    p.y = y * ND_ht(n) / 2.0;
+    p.x = ND_rw(n) * x;        /* assume node is symmetric */
 
     AF[0] = add_pointfs(p, ND_coord(n));
     AF[1].y = AF[0].y;
@@ -1084,11 +1084,11 @@ static boolean poly_inside(inside_t * inside_context, pointf p)
 
        /* get point and node size adjusted for rankdir=LR */
        if (GD_flip(n->graph)) {
-           ysize = ND_lw_i(n) + ND_rw_i(n);
-           xsize = ND_ht_i(n);
+           ysize = ND_lw(n) + ND_rw(n);
+           xsize = ND_ht(n);
        } else {
-           xsize = ND_lw_i(n) + ND_rw_i(n);
-           ysize = ND_ht_i(n);
+           xsize = ND_lw(n) + ND_rw(n);
+           ysize = ND_ht(n);
        }
 
        /* scale */
@@ -1313,14 +1313,14 @@ compassPort(node_t* n, boxf* bp, port* pp, char* compass, int sides, inside_t* i
     } else {
        p.x = p.y = 0.;
        if (GD_flip(n->graph)) {
-           b.UR.x = ND_ht_i(n) / 2.;
+           b.UR.x = ND_ht(n) / 2.;
            b.LL.x = -b.UR.x;
-           b.UR.y = ND_lw_i(n);
+           b.UR.y = ND_lw(n);
            b.LL.y = -b.UR.y;
        } else {
-           b.UR.y = ND_ht_i(n) / 2.;
+           b.UR.y = ND_ht(n) / 2.;
            b.LL.y = -b.UR.y;
-           b.UR.x = ND_lw_i(n);
+           b.UR.x = ND_lw(n);
            b.LL.x = -b.UR.x;
        }
        defined = FALSE;
@@ -1507,8 +1507,8 @@ static void poly_gencode(GVJ_t * job, node_t * n)
     /* nominal label position in the center of the node */
     ND_label(n)->pos = ND_coord(n);
 
-    xsize = (double)(ND_lw_i(n) + ND_rw_i(n)) / POINTS(ND_width(n));
-    ysize = (double)ND_ht_i(n) / POINTS(ND_height(n));
+    xsize = (ND_lw(n) + ND_rw(n)) / POINTS(ND_width(n));
+    ysize = ND_ht(n) / POINTS(ND_height(n));
 
     style = stylenode(job, n);
 
@@ -2266,10 +2266,10 @@ static int record_path(node_t* n, port* prt, int side, boxf rv[], int *kptr)
                rv[0] = flip_rec_boxf(info->fld[i]->b, ND_coord(n));
            } else {
                rv[0].LL.x = ND_coord(n).x + ls;
-               rv[0].LL.y = ND_coord(n).y - (ND_ht_i(n) / 2);
+               rv[0].LL.y = ND_coord(n).y - (ND_ht(n) / 2);
                rv[0].UR.x = ND_coord(n).x + rs;
            }
-           rv[0].UR.y = ND_coord(n).y + (ND_ht_i(n) / 2);
+           rv[0].UR.y = ND_coord(n).y + (ND_ht(n) / 2);
            *kptr = 1;
            break;
        }
@@ -2418,9 +2418,8 @@ static boolean epsf_inside(inside_t * inside_context, pointf p)
     node_t *n = inside_context->s.n;
 
     P = ccwrotatepf(p, 90*GD_rankdir(n->graph));
-    x2 = ND_ht_i(n) / 2;
-    return ((P.y >= -x2) && (P.y <= x2) && (P.x >= -ND_lw_i(n))
-           && (P.x <= ND_rw_i(n)));
+    x2 = ND_ht(n) / 2;
+    return ((P.y >= -x2) && (P.y <= x2) && (P.x >= -ND_lw(n)) && (P.x <= ND_rw(n)));
 }
 
 static void epsf_gencode(GVJ_t * job, node_t * n)
@@ -2498,14 +2497,14 @@ static char* closestSide (node_t*  n, node_t* other, port* oldport)
        b = *oldport->bp;
     } else {
        if (GD_flip(n->graph)) {
-           b.UR.x = ND_ht_i(n) / 2;
+           b.UR.x = ND_ht(n) / 2;
            b.LL.x = -b.UR.x;
-           b.UR.y = ND_lw_i(n);
+           b.UR.y = ND_lw(n);
            b.LL.y = -b.UR.y;
        } else {
-           b.UR.y = ND_ht_i(n) / 2;
+           b.UR.y = ND_ht(n) / 2;
            b.LL.y = -b.UR.y;
-           b.UR.x = ND_lw_i(n);
+           b.UR.x = ND_lw(n);
            b.LL.x = -b.UR.x;
        }
     }
index a50c92d63e7af28649e558a6ab896646ab7d7f77..df346d97ce884d93c3025872194ef5f5c6df5aca 100644 (file)
@@ -157,7 +157,7 @@ shape_clip0(inside_t * inside_context, node_t * n, pointf curve[4],
     int i, save_real_size;
     pointf c[4];
 
-    save_real_size = ND_rw_i(n);
+    save_real_size = ND_rw(n);
     for (i = 0; i < 4; i++) {
        c[i].x = curve[i].x - ND_coord(n).x;
        c[i].y = curve[i].y - ND_coord(n).y;
@@ -170,7 +170,7 @@ shape_clip0(inside_t * inside_context, node_t * n, pointf curve[4],
        curve[i].x = c[i].x + ND_coord(n).x;
        curve[i].y = c[i].y + ND_coord(n).y;
     }
-    ND_rw_i(n) = save_real_size;
+    ND_rw(n) = save_real_size;
 }
 
 /* shape_clip:
@@ -197,11 +197,11 @@ void shape_clip(node_t * n, pointf curve[4])
 
     inside_context.s.n = n;
     inside_context.s.bp = NULL;
-    save_real_size = ND_rw_i(n);
+    save_real_size = ND_rw(n);
     c.x = curve[0].x - ND_coord(n).x;
     c.y = curve[0].y - ND_coord(n).y;
     left_inside = ND_shape(n)->fns->insidefn(&inside_context, c);
-    ND_rw_i(n) = save_real_size;
+    ND_rw(n) = save_real_size;
     shape_clip0(&inside_context, n, curve, left_inside);
 }
 
@@ -418,13 +418,13 @@ beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
            endp->sidemask = TOP;
            if (P->start.p.x < ND_coord(n).x) { /* go left */
                b0.LL.x = b.LL.x - 1;
-               /* b0.LL.y = ND_coord(n).y + ND_ht_i(n)/2; */
+               /* b0.LL.y = ND_coord(n).y + ND_ht(n)/2; */
                b0.LL.y = P->start.p.y;
                b0.UR.x = b.UR.x;
-               b0.UR.y = ND_coord(n).y + ND_ht_i(n)/2 + GD_ranksep(n->graph)/2;
-               b.UR.x = ND_coord(n).x - ND_lw_i(n) - (FUDGE-2);
+               b0.UR.y = ND_coord(n).y + ND_ht(n)/2 + GD_ranksep(n->graph)/2;
+               b.UR.x = ND_coord(n).x - ND_lw(n) - (FUDGE-2);
                b.UR.y = b0.LL.y;
-               b.LL.y = ND_coord(n).y - ND_ht_i(n)/2;
+               b.LL.y = ND_coord(n).y - ND_ht(n)/2;
                b.LL.x -= 1;
                endp->boxes[0] = b0;
                endp->boxes[1] = b;
@@ -432,12 +432,12 @@ beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
            else {
                b0.LL.x = b.LL.x;
                b0.LL.y = P->start.p.y;
-               /* b0.LL.y = ND_coord(n).y + ND_ht_i(n)/2; */
+               /* b0.LL.y = ND_coord(n).y + ND_ht(n)/2; */
                b0.UR.x = b.UR.x+1;
-               b0.UR.y = ND_coord(n).y + ND_ht_i(n)/2 + GD_ranksep(n->graph)/2;
-               b.LL.x = ND_coord(n).x + ND_rw_i(n) + (FUDGE-2);
+               b0.UR.y = ND_coord(n).y + ND_ht(n)/2 + GD_ranksep(n->graph)/2;
+               b.LL.x = ND_coord(n).x + ND_rw(n) + (FUDGE-2);
                b.UR.y = b0.LL.y;
-               b.LL.y = ND_coord(n).y - ND_ht_i(n)/2;
+               b.LL.y = ND_coord(n).y - ND_ht(n)/2;
                b.UR.x += 1;
                endp->boxes[0] = b0;
                endp->boxes[1] = b;
@@ -455,7 +455,7 @@ beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        else if (side & LEFT) {
            endp->sidemask = LEFT;
            b.UR.x = P->start.p.x;
-           b.LL.y = ND_coord(n).y - ND_ht_i(n)/2;
+           b.LL.y = ND_coord(n).y - ND_ht(n)/2;
            b.UR.y = P->start.p.y;
            endp->boxes[0] = b;
            endp->boxn = 1;
@@ -464,7 +464,7 @@ beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        else {
            endp->sidemask = RIGHT;
            b.LL.x = P->start.p.x;
-           b.LL.y = ND_coord(n).y - ND_ht_i(n)/2;
+           b.LL.y = ND_coord(n).y - ND_ht(n)/2;
            b.UR.y = P->start.p.y;
            endp->boxes[0] = b;
            endp->boxn = 1;
@@ -487,13 +487,13 @@ beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        }
        else if (side & BOTTOM) {
            if (endp->sidemask == TOP) {
-               b0.UR.y = ND_coord(n).y - ND_ht_i(n)/2;
+               b0.UR.y = ND_coord(n).y - ND_ht(n)/2;
                b0.UR.x = b.UR.x+1;
                b0.LL.x = P->start.p.x;
                b0.LL.y = b0.UR.y - GD_ranksep(n->graph)/2;
-               b.LL.x = ND_coord(n).x + ND_rw_i(n) + (FUDGE-2);
+               b.LL.x = ND_coord(n).x + ND_rw(n) + (FUDGE-2);
                b.LL.y = b0.UR.y;
-               b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+               b.UR.y = ND_coord(n).y + ND_ht(n)/2;
                b.UR.x += 1;
                endp->boxes[0] = b0;
                endp->boxes[1] = b;
@@ -508,11 +508,11 @@ beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        else if (side & LEFT) {
            b.UR.x = P->start.p.x+1;
            if (endp->sidemask == TOP) {
-               b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+               b.UR.y = ND_coord(n).y + ND_ht(n)/2;
                b.LL.y = P->start.p.y-1;
            }
            else {
-               b.LL.y = ND_coord(n).y - ND_ht_i(n)/2;
+               b.LL.y = ND_coord(n).y - ND_ht(n)/2;
                b.UR.y = P->start.p.y+1;
            }
            endp->boxes[0] = b;
@@ -521,11 +521,11 @@ beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        else {
            b.LL.x = P->start.p.x;
            if (endp->sidemask == TOP) {
-               b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+               b.UR.y = ND_coord(n).y + ND_ht(n)/2;
                b.LL.y = P->start.p.y;
            }
            else {
-               b.LL.y = ND_coord(n).y - ND_ht_i(n)/2;
+               b.LL.y = ND_coord(n).y - ND_ht(n)/2;
                b.UR.y = P->start.p.y+1;
            }
            endp->boxes[0] = b;
@@ -615,13 +615,13 @@ void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
            endp->sidemask = BOTTOM;
            if (P->end.p.x < ND_coord(n).x) { /* go left */
                b0.LL.x = b.LL.x-1;
-               /* b0.UR.y = ND_coord(n).y - ND_ht_i(n)/2; */
+               /* b0.UR.y = ND_coord(n).y - ND_ht(n)/2; */
                b0.UR.y = P->end.p.y;
                b0.UR.x = b.UR.x;
-               b0.LL.y = ND_coord(n).y - ND_ht_i(n)/2 - GD_ranksep(n->graph)/2;
-               b.UR.x = ND_coord(n).x - ND_lw_i(n) - (FUDGE-2);
+               b0.LL.y = ND_coord(n).y - ND_ht(n)/2 - GD_ranksep(n->graph)/2;
+               b.UR.x = ND_coord(n).x - ND_lw(n) - (FUDGE-2);
                b.LL.y = b0.UR.y;
-               b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+               b.UR.y = ND_coord(n).y + ND_ht(n)/2;
                b.LL.x -= 1;
                endp->boxes[0] = b0;
                endp->boxes[1] = b;
@@ -629,12 +629,12 @@ void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
            else {
                b0.LL.x = b.LL.x;
                b0.UR.y = P->end.p.y;
-               /* b0.UR.y = ND_coord(n).y - ND_ht_i(n)/2; */
+               /* b0.UR.y = ND_coord(n).y - ND_ht(n)/2; */
                b0.UR.x = b.UR.x+1;
-               b0.LL.y = ND_coord(n).y - ND_ht_i(n)/2 - GD_ranksep(n->graph)/2;
-               b.LL.x = ND_coord(n).x + ND_rw_i(n) + (FUDGE-2);
+               b0.LL.y = ND_coord(n).y - ND_ht(n)/2 - GD_ranksep(n->graph)/2;
+               b.LL.x = ND_coord(n).x + ND_rw(n) + (FUDGE-2);
                b.LL.y = b0.UR.y;
-               b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+               b.UR.y = ND_coord(n).y + ND_ht(n)/2;
                b.UR.x += 1;
                endp->boxes[0] = b0;
                endp->boxes[1] = b;
@@ -645,7 +645,7 @@ void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        else if (side & LEFT) {
            endp->sidemask = LEFT;
            b.UR.x = P->end.p.x;
-           b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+           b.UR.y = ND_coord(n).y + ND_ht(n)/2;
            b.LL.y = P->end.p.y;
            endp->boxes[0] = b;
            endp->boxn = 1;
@@ -654,7 +654,7 @@ void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        else {
            endp->sidemask = RIGHT;
            b.LL.x = P->end.p.x;
-           b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+           b.UR.y = ND_coord(n).y + ND_ht(n)/2;
            b.LL.y = P->end.p.y;
            endp->boxes[0] = b;
            endp->boxn = 1;
@@ -676,11 +676,11 @@ void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        case LEFT:
            b.UR.x = P->end.p.x;
            if (endp->sidemask == TOP) {
-               b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+               b.UR.y = ND_coord(n).y + ND_ht(n)/2;
                b.LL.y = P->end.p.y;
            }
            else {
-               b.LL.y = ND_coord(n).y - ND_ht_i(n)/2;
+               b.LL.y = ND_coord(n).y - ND_ht(n)/2;
                b.UR.y = P->end.p.y;
            }
            endp->boxes[0] = b;
@@ -689,11 +689,11 @@ void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        case RIGHT:
            b.LL.x = P->end.p.x-1;
            if (endp->sidemask == TOP) {
-               b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+               b.UR.y = ND_coord(n).y + ND_ht(n)/2;
                b.LL.y = P->end.p.y-1;
            }
            else {
-               b.LL.y = ND_coord(n).y - ND_ht_i(n)/2;
+               b.LL.y = ND_coord(n).y - ND_ht(n)/2;
                b.UR.y = P->end.p.y;
            }
            endp->boxes[0] = b;
@@ -707,12 +707,12 @@ void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
        case BOTTOM:
            if (endp->sidemask == TOP) {
                b0.LL.x = b.LL.x-1;
-               b0.UR.y = ND_coord(n).y - ND_ht_i(n)/2;
+               b0.UR.y = ND_coord(n).y - ND_ht(n)/2;
                b0.UR.x = P->end.p.x;
                b0.LL.y = b0.UR.y - GD_ranksep(n->graph)/2;
-               b.UR.x = ND_coord(n).x - ND_lw_i(n) - 2;
+               b.UR.x = ND_coord(n).x - ND_lw(n) - 2;
                b.LL.y = b0.UR.y;
-               b.UR.y = ND_coord(n).y + ND_ht_i(n)/2;
+               b.UR.y = ND_coord(n).y + ND_ht(n)/2;
                b.LL.x -= 1;
                endp->boxes[0] = b0;
                endp->boxes[1] = b;
@@ -792,7 +792,7 @@ static void selfBottom (edge_t* edges[], int ind, int cnt,
     hp.y += np.y;
     if (tp.x >= hp.x) sgn = 1;
     else sgn = -1;
-    dy = ND_ht_i(n)/2., dx = 0.;
+    dy = ND_ht(n)/2., dx = 0.;
     ty = MIN(dy, 3*(tp.y + dy - np.y));
     hy = MIN(dy, 3*(hp.y + dy - np.y));
     for (i = 0; i < cnt; i++) {
@@ -858,7 +858,7 @@ selfTop (edge_t* edges[], int ind, int cnt, double sizex, double stepy,
     hp.y += np.y;
     if (tp.x >= hp.x) sgn = 1;
     else sgn = -1;
-    dy = ND_ht_i(n)/2., dx = 0.;
+    dy = ND_ht(n)/2., dx = 0.;
     ty = MIN(dy, 3*(np.y + dy - tp.y));
     hy = MIN(dy, 3*(np.y + dy - hp.y));
     for (i = 0; i < cnt; i++) {
@@ -924,7 +924,7 @@ selfRight (edge_t* edges[], int ind, int cnt, double stepx, double sizey,
     hp.y += np.y;
     if (tp.y >= hp.y) sgn = 1;
     else sgn = -1;
-    dx = ND_rw_i(n), dy = 0;
+    dx = ND_rw(n), dy = 0;
     tx = MIN(dx, 3*(np.x + dx - tp.x));
     hx = MIN(dx, 3*(np.x + dx - hp.x));
     for (i = 0; i < cnt; i++) {
@@ -990,7 +990,7 @@ selfLeft (edge_t* edges[], int ind, int cnt, double stepx, double sizey,
     hp.y += np.y;
     if (tp.y >= hp.y) sgn = 1;
     else sgn = -1;
-    dx = ND_lw_i(n), dy = 0.;
+    dx = ND_lw(n), dy = 0.;
     tx = MIN(dx, 3*(tp.x + dx - np.x));
     hx = MIN(dx, 3*(hp.x + dx - np.x));
     for (i = 0; i < cnt; i++) {
index 1ab9486bae030d287b4c335d09a32ca8079dac18..d1f37ecaa5d217d68212cf1121a7a0348febaae3 100644 (file)
@@ -431,9 +431,9 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;
        shape_desc *shape;
        void *shape_info;
        pointf coord;
-       double width, height;
+       double width, height;  /* inches */
        boxf bb;
-       int ht, lw, rw;
+       double ht, lw, rw;
        textlabel_t *label;
        void *alg;
        char state;
@@ -492,14 +492,14 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;
 #define ND_heapindex(n) (n)->u.heapindex
 #define ND_height(n) (n)->u.height
 #define ND_hops(n) (n)->u.hops
-#define ND_ht_i(n) (n)->u.ht
+#define ND_ht(n) (n)->u.ht
 #define ND_id(n) (n)->u.id
 #define ND_in(n) (n)->u.in
 #define ND_inleaf(n) (n)->u.inleaf
 #define ND_label(n) (n)->u.label
 #define ND_lim(n) (n)->u.lim
 #define ND_low(n) (n)->u.low
-#define ND_lw_i(n) (n)->u.lw
+#define ND_lw(n) (n)->u.lw
 #define ND_mark(n) (n)->u.mark
 #define ND_mval(n) (n)->u.mval
 #define ND_n_cluster(n) (n)->u.n_cluster
@@ -517,7 +517,7 @@ typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;
 #define ND_priority(n) (n)->u.priority
 #define ND_rank(n) (n)->u.rank
 #define ND_ranktype(n) (n)->u.ranktype
-#define ND_rw_i(n) (n)->u.rw
+#define ND_rw(n) (n)->u.rw
 #define ND_save_in(n) (n)->u.save_in
 #define ND_save_out(n) (n)->u.save_out
 #define ND_shape(n) (n)->u.shape
index 8a26215490e7f3814be67708e5547902574f591f..6991eac1bb23b634a85efc831f24b7f3713c7973 100644 (file)
@@ -1669,7 +1669,7 @@ void gv_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));
+    ND_lw(n) = ND_rw(n) = w / 2;
+    ND_ht(n) = ND_ysize(n) = POINTS(ND_height(n));
 }
 
index 5dbd5e2187143b6b36d1b6e73749e15e3a5bf00f..f5f911bf54391715ac2d98bf6bdcde254be6b800 100644 (file)
@@ -28,14 +28,14 @@ label_vnode(graph_t * g, edge_t * orig)
     dimen = ED_label(orig)->dimen;
     v = virtual_node(g);
     ND_label(v) = ED_label(orig);
-    ND_lw_i(v) = GD_nodesep(v->graph->root);
+    ND_lw(v) = GD_nodesep(v->graph->root);
     if (!ED_label_ontop(orig)) {
        if (GD_flip(g->root)) {
-           ND_ht_i(v) = dimen.x;
-           ND_rw_i(v) = dimen.y;
+           ND_ht(v) = dimen.x;
+           ND_rw(v) = dimen.y;
        } else {
-           ND_ht_i(v) = dimen.y;
-           ND_rw_i(v) = dimen.x;
+           ND_ht(v) = dimen.y;
+           ND_rw(v) = dimen.x;
        }
     }
     return v;
@@ -45,8 +45,8 @@ static void
 incr_width(graph_t * g, node_t * v)
 {
     int width = GD_nodesep(g) / 2;
-    ND_lw_i(v) += width;
-    ND_rw_i(v) += width;
+    ND_lw(v) += width;
+    ND_rw(v) += width;
 }
 
 static node_t*
index 6874a85ac96fb9659dbfd5561afb464ed957af1c..333b1159268f0526299b2b0352198793b966b9b5 100644 (file)
@@ -66,8 +66,8 @@ clone_vn(graph_t * g, node_t * vn)
     r = ND_rank(vn);
     make_slots(g, r, ND_order(vn), 2);
     rv = virtual_node(g);
-    ND_lw_i(rv) = ND_lw_i(vn);
-    ND_rw_i(rv) = ND_rw_i(vn);
+    ND_lw(rv) = ND_lw(vn);
+    ND_rw(rv) = ND_rw(vn);
     ND_rank(rv) = ND_rank(vn);
     ND_order(rv) = ND_order(vn) + 1;
     GD_rank(g)[r].v[ND_order(rv)] = rv;
index 9ad4c4509356be75497d5168fe4955c8a032f483..ba313a0e3dd6335068349b8799ed6863f7f7ace3 100644 (file)
@@ -51,7 +51,7 @@ extern "C" {
     extern void install_in_rank(Agraph_t *, Agnode_t *);
     extern int is_cluster(Agraph_t *);
     extern void dot_compoundEdges(Agraph_t *);
-    extern Agedge_t *make_aux_edge(Agnode_t *, Agnode_t *, int, int);
+    extern Agedge_t *make_aux_edge(Agnode_t *, Agnode_t *, double, int);
     extern void mark_clusters(Agraph_t *);
     extern void mark_lowclusters(Agraph_t *);
     extern int mergeable(edge_t * e, edge_t * f);
index 9515474cb524ed86f56acfd69e5585c7cad76e51..7b432a4303d5775981ee189c558b1eb1459e86a4 100644 (file)
@@ -235,9 +235,9 @@ static void _dot_splines(graph_t * g, int normalize)
     for (i = GD_minrank(g); i <= GD_maxrank(g); i++) {
        n_nodes += GD_rank(g)[i].n;
        if ((n = GD_rank(g)[i].v[0]))
-           sd.LeftBound = MIN(sd.LeftBound, (ND_coord(n).x - ND_lw_i(n)));
+           sd.LeftBound = MIN(sd.LeftBound, (ND_coord(n).x - ND_lw(n)));
        if (GD_rank(g)[i].n && (n = GD_rank(g)[i].v[GD_rank(g)[i].n - 1]))
-           sd.RightBound = MAX(sd.RightBound, (ND_coord(n).x + ND_rw_i(n)));
+           sd.RightBound = MAX(sd.RightBound, (ND_coord(n).x + ND_rw(n)));
        sd.LeftBound -= MINW;
        sd.RightBound += MINW;
 
@@ -277,8 +277,8 @@ static void _dot_splines(graph_t * g, int normalize)
                  * the original value here. 
                  */
                if (ND_node_type(n) == NORMAL) {
-                   int tmp = ND_rw_i(n);
-                   ND_rw_i(n) = ND_mval(n);
+                   double tmp = ND_rw(n);
+                   ND_rw(n) = ND_mval(n);
                    ND_mval(n) = tmp;
                }
                for (k = 0; (e = ND_other(n).list[k]); k++) {
@@ -351,7 +351,7 @@ static void _dot_splines(graph_t * g, int normalize)
                if (r > 0)
                    sizey = ND_coord(GD_rank(g)[r-1].v[0]).y - ND_coord(n).y;
                else
-                   sizey = ND_ht_i(n);
+                   sizey = ND_ht(n);
            }
            else if (r == GD_minrank(g)) {
                sizey = ND_coord(n).y - ND_coord(GD_rank(g)[r+1].v[0]).y;
@@ -692,8 +692,8 @@ makeSimpleFlat (node_t* tn, node_t* hn, edge_t** edges, int ind, int cnt, int et
     tp = add_pointfs(ND_coord(tn), ED_tail_port(e).p);
     hp = add_pointfs(ND_coord(hn), ED_head_port(e).p);
 
-    stepy = (cnt > 1) ? ND_ht_i(tn) / (double)(cnt - 1) : 0.;
-    dy = tp.y - ((cnt > 1) ? ND_ht_i(tn) / 2. : 0.);
+    stepy = (cnt > 1) ? ND_ht(tn) / (double)(cnt - 1) : 0.;
+    dy = tp.y - ((cnt > 1) ? ND_ht(tn) / 2. : 0.);
 
     for (i = 0; i < cnt; i++) {
        e = edges[ind + i];
@@ -796,7 +796,7 @@ make_flat_adj_edges(path* P, edge_t** edges, int ind, int cnt, edge_t* e0,
     dot_position(auxg);
     
     /* reposition */
-    midx = (ND_coord(tn).x - ND_rw_i(tn) + ND_coord(hn).x + ND_lw_i(hn))/2;
+    midx = (ND_coord(tn).x - ND_rw(tn) + ND_coord(hn).x + ND_lw(hn))/2;
     midy = (ND_coord(auxt).x + ND_coord(auxh).x)/2;
     for (n = GD_nlist(auxg); n; n = ND_next(n)) {
        if (n == auxt) {
@@ -942,9 +942,9 @@ make_flat_labeled_edge(spline_info_t* sp, path* P, edge_t* e, int et)
        pn = 7;
     }
     else {
-       lb.LL.x = ND_coord(ln).x - ND_lw_i(ln);
-       lb.UR.x = ND_coord(ln).x + ND_rw_i(ln);
-       lb.UR.y = ND_coord(ln).y + ND_ht_i(ln)/2;
+       lb.LL.x = ND_coord(ln).x - ND_lw(ln);
+       lb.UR.x = ND_coord(ln).x + ND_rw(ln);
+       lb.UR.y = ND_coord(ln).y + ND_ht(ln)/2;
        ydelta = ND_coord(ln).y - GD_rank(g)[ND_rank(tn)].ht1 -
                ND_coord(tn).y + GD_rank(g)[ND_rank(tn)].ht2;
        ydelta /= 6.;
@@ -1786,7 +1786,7 @@ static void recover_slack(edge_t * e, path * p)
            continue;
        if (ND_label(vn))
            resize_vn(vn, p->boxes[b].LL.x, p->boxes[b].UR.x,
-                     p->boxes[b].UR.x + ND_rw_i(vn));
+                     p->boxes[b].UR.x + ND_rw(vn));
        else
            resize_vn(vn, p->boxes[b].LL.x, (p->boxes[b].LL.x +
                                             p->boxes[b].UR.x) / 2,
@@ -1799,7 +1799,7 @@ node_t *vn;
 int lx, cx, rx;
 {
     ND_coord(vn).x = cx;
-    ND_lw_i(vn) = cx - lx, ND_rw_i(vn) = rx - cx;
+    ND_lw(vn) = cx - lx, ND_rw(vn) = rx - cx;
 }
 
 /* side > 0 means right. side < 0 means left */
@@ -1909,7 +1909,7 @@ static boxf maximal_bbox(spline_info_t* sp, node_t* vn, edge_t* ie, edge_t* oe)
     left_cl = right_cl = NULL;
 
     /* give this node all the available space up to its neighbors */
-    b = (double)(ND_coord(vn).x - ND_lw_i(vn) - FUDGE);
+    b = (double)(ND_coord(vn).x - ND_lw(vn) - FUDGE);
     if ((left = neighbor(vn, ie, oe, -1))) {
        if ((left_cl = cl_bound(vn, left)))
            nb = GD_bb(left_cl).UR.x + (double)(sp->Splinesep);
@@ -1930,12 +1930,12 @@ static boxf maximal_bbox(spline_info_t* sp, node_t* vn, edge_t* ie, edge_t* oe)
     if ((ND_node_type(vn) == VIRTUAL) && (ND_label(vn)))
        b = (double)(ND_coord(vn).x + 10);
     else
-       b = (double)(ND_coord(vn).x + ND_rw_i(vn) + FUDGE);
+       b = (double)(ND_coord(vn).x + ND_rw(vn) + FUDGE);
     if ((right = neighbor(vn, ie, oe, 1))) {
        if ((right_cl = cl_bound(vn, right)))
            nb = GD_bb(right_cl).LL.x - (double)(sp->Splinesep);
        else {
-           nb = ND_coord(right).x - ND_lw_i(right);
+           nb = ND_coord(right).x - ND_lw(right);
            if (ND_node_type(right) == NORMAL)
                nb -= GD_nodesep(g) / 2.;
            else
@@ -1948,7 +1948,7 @@ static boxf maximal_bbox(spline_info_t* sp, node_t* vn, edge_t* ie, edge_t* oe)
        rv.UR.x = MAX(ROUND(b), sp->RightBound);
 
     if ((ND_node_type(vn) == VIRTUAL) && (ND_label(vn)))
-       rv.UR.x -= ND_rw_i(vn);
+       rv.UR.x -= ND_rw(vn);
 
     rv.LL.y = ND_coord(vn).y - GD_rank(g)[ND_rank(vn)].ht1;
     rv.UR.y = ND_coord(vn).y + GD_rank(g)[ND_rank(vn)].ht2;
index 143ba5482154d9060270bccc8e96e857e9e3d712..7bbad2b15d985f202b22358dfa925957c30eb553 100644 (file)
@@ -243,8 +243,8 @@ node_t *virtual_node(graph_t * g)
     n->name = "virtual";
     n->graph = g;
     ND_node_type(n) = VIRTUAL;
-    ND_lw_i(n) = ND_rw_i(n) = 1;
-    ND_ht_i(n) = 1;
+    ND_lw(n) = ND_rw(n) = 1;
+    ND_ht(n) = 1;
     ND_UF_size(n) = 1;
     alloc_elist(4, ND_in(n));
     alloc_elist(4, ND_out(n));
index aeb9395ee211d15b1edd9efb10963e87560698f2..38698729b4b54795d6de678940956dd779c3a92f 100644 (file)
@@ -164,18 +164,18 @@ flat_node(edge_t * e)
        dimen.x = dimen.y;
        dimen.y = f;
     }
-    ND_ht_i(vn) = dimen.y;
-    h2 = ND_ht_i(vn) / 2;
-    ND_lw_i(vn) = ND_rw_i(vn) = dimen.x / 2;
+    ND_ht(vn) = dimen.y;
+    h2 = ND_ht(vn) / 2;
+    ND_lw(vn) = ND_rw(vn) = dimen.x / 2;
     ND_label(vn) = ED_label(e);
     ND_coord(vn).y = ypos + h2;
     ve = virtual_edge(vn, e->tail, e); /* was NULL? */
-    ED_tail_port(ve).p.x = -ND_lw_i(vn);
-    ED_head_port(ve).p.x = ND_rw_i(e->tail);
+    ED_tail_port(ve).p.x = -ND_lw(vn);
+    ED_head_port(ve).p.x = ND_rw(e->tail);
     ED_edge_type(ve) = FLATORDER;
     ve = virtual_edge(vn, e->head, e);
-    ED_tail_port(ve).p.x = ND_rw_i(vn);
-    ED_head_port(ve).p.x = ND_lw_i(e->head);
+    ED_tail_port(ve).p.x = ND_rw(vn);
+    ED_head_port(ve).p.x = ND_lw(e->head);
     ED_edge_type(ve) = FLATORDER;
     /* another assumed symmetry of ht1/ht2 of a label node */
     if (GD_rank(g)[r - 1].ht1 < h2)
index 4e6a370d0f749bd276d9336fa23900a9692622d2..ca541884954ce5ec8db2cc79d2fee8f5dd9b4e53 100644 (file)
@@ -58,7 +58,7 @@ dumpNS (graph_t * g)
 #endif
 
 static void
-largeMinlen (int l)
+largeMinlen (double l)
 {
     agerr (AGERR, "Edge length %d larger than maximum %u allowed.\nCheck for overwide node(s).\n", l, USHRT_MAX); 
     exit (1);
@@ -170,7 +170,7 @@ static int canreach(node_t * u, node_t * v)
     return go(u, v);
 }
 
-edge_t *make_aux_edge(node_t * u, node_t * v, int len, int wt)
+edge_t *make_aux_edge(node_t * u, node_t * v, double len, int wt)
 {
     edge_t *e;
 
@@ -179,7 +179,7 @@ edge_t *make_aux_edge(node_t * u, node_t * v, int len, int wt)
     e->head = v;
     if (len > USHRT_MAX)
        largeMinlen (len);
-    ED_minlen(e) = len;
+    ED_minlen(e) = ROUND(len);
     ED_weight(e) = wt;
     fast_edge(e);
     return e;
@@ -210,7 +210,8 @@ make_LR_constraints(graph_t * g)
     int i, j, k;
     int sw;                    /* self width */
     int m0, m1;
-    int width, sep[2];
+    double width;
+    int sep[2];
     int nodesep;      /* separation between nodes on same rank */
     edge_t *e, *e0, *e1, *ff;
     node_t *u, *v, *t0, *h0;
@@ -226,12 +227,12 @@ make_LR_constraints(graph_t * g)
     }
     /* make edges to constrain left-to-right ordering */
     for (i = GD_minrank(g); i <= GD_maxrank(g); i++) {
-       int last;
+       double last;
        last = rank[i].v[0]->u.rank = 0;
        nodesep = sep[i & 1];
        for (j = 0; j < rank[i].n; j++) {
            u = rank[i].v[j];
-           ND_mval(u) = ND_rw_i(u);    /* keep it somewhere safe */
+           ND_mval(u) = ND_rw(u);      /* keep it somewhere safe */
            if (ND_other(u).size > 0) { /* compute self size */
                /* FIX: dot assumes all self-edges go to the right. This
                  * is no longer true, though makeSelfEdge still attempts to
@@ -247,11 +248,11 @@ make_LR_constraints(graph_t * g)
                        sw += selfRightSpace (e);
                    }
                }
-               ND_rw_i(u) += sw;       /* increment to include self edges */
+               ND_rw(u) += sw; /* increment to include self edges */
            }
            v = rank[i].v[j + 1];
            if (v) {
-               width = ND_rw_i(u) + ND_lw_i(v) + nodesep;
+               width = ND_rw(u) + ND_lw(v) + nodesep;
                e0 = make_aux_edge(u, v, width, 0);
                last = (ND_rank(v) = last + width);
            }
@@ -266,13 +267,13 @@ make_LR_constraints(graph_t * g)
                    e1 = ff;
                }
                m0 = (ED_minlen(e) * GD_nodesep(g)) / 2;
-               m1 = m0 + ND_rw_i(e0->head) + ND_lw_i(e0->tail);
+               m1 = m0 + ND_rw(e0->head) + ND_lw(e0->tail);
                /* these guards are needed because the flat edges
                 * work very poorly with cluster layout */
                if (canreach(e0->tail, e0->head) == FALSE)
                    make_aux_edge(e0->head, e0->tail, m1,
                        ED_weight(e));
-               m1 = m0 + ND_rw_i(e1->tail) + ND_lw_i(e1->head);
+               m1 = m0 + ND_rw(e1->tail) + ND_lw(e1->head);
                if (canreach(e1->head, e1->tail) == FALSE)
                    make_aux_edge(e1->tail, e1->head, m1,
                        ED_weight(e));
@@ -289,7 +290,7 @@ make_LR_constraints(graph_t * g)
                    h0 = e->tail;
                }
 
-               width = ND_rw_i(t0) + ND_lw_i(h0);
+               width = ND_rw(t0) + ND_lw(h0);
                m0 = ED_minlen(e) * GD_nodesep(g) + width;
 
                if ((e0 = find_fast_edge(t0, h0))) {
@@ -341,7 +342,7 @@ static void make_edge_pairs(graph_t * g)
                    && (i == ND_save_out(n).size / 2 - 1)) {
                    node_t *u = ND_save_out(n).list[i]->head;
                    node_t *v = ND_save_out(n).list[i + 1]->head;
-                   int width = ND_rw_i(u) + ND_lw_i(v) + GD_nodesep(g);
+                   double width = ND_rw(u) + ND_lw(v) + GD_nodesep(g);
                    m0 = width / 2 - 1;
                }
 #endif
@@ -409,7 +410,7 @@ static void keepout_othernodes(graph_t * g)
            u = GD_rank(g->root)[r].v[i];
            /* can't use "is_a_vnode_of" because elists are swapped */
            if ((ND_node_type(u) == NORMAL) || vnode_not_related_to(g, u)) {
-               make_aux_edge(u, GD_ln(g), CL_OFFSET + ND_rw_i(u), 0);
+               make_aux_edge(u, GD_ln(g), CL_OFFSET + ND_rw(u), 0);
                break;
            }
        }
@@ -417,7 +418,7 @@ static void keepout_othernodes(graph_t * g)
             i++) {
            u = ND_rank(g->root)[r].v[i];
            if ((ND_node_type(u) == NORMAL) || vnode_not_related_to(g, u)) {
-               make_aux_edge(GD_rn(g), u, CL_OFFSET + ND_lw_i(u), 0);
+               make_aux_edge(GD_rn(g), u, CL_OFFSET + ND_lw(u), 0);
                break;
            }
        }
@@ -793,7 +794,7 @@ static void set_ycoords(graph_t * g)
            n = rank[r].v[i];
 
            /* assumes symmetry, ht1 = ht2 */
-           ht2 = (ND_ht_i(n) + 1) / 2;
+           ht2 = (ROUND(ND_ht(n)) + 1) / 2;
 
 
            /* have to look for high self-edge labels, too */
@@ -885,7 +886,7 @@ static void dot_compute_bb(graph_t * g, graph_t * root)
            for (c = 1; (ND_node_type(v) != NORMAL) && c < rnkn; c++)
                v = GD_rank(g)[r].v[c];
            if (ND_node_type(v) == NORMAL) {
-               x = ND_coord(v).x - ND_lw_i(v);
+               x = ND_coord(v).x - ND_lw(v);
                LL.x = MIN(LL.x, x);
            }
            else continue;
@@ -893,7 +894,7 @@ static void dot_compute_bb(graph_t * g, graph_t * root)
            v = GD_rank(g)[r].v[rnkn - 1];
            for (c = rnkn-2; ND_node_type(v) != NORMAL; c--)
                v = GD_rank(g)[r].v[c];
-           x = ND_coord(v).x + ND_rw_i(v);
+           x = ND_coord(v).x + ND_rw(v);
            UR.x = MAX(UR.x, x);
        }
        offset = CL_OFFSET;
@@ -1025,8 +1026,8 @@ static point resize_leaf(node_t * leaf, point lbound)
 {
     dot_nodesize(leaf, GD_flip(leaf->graph));
     ND_coord(leaf).y = lbound.y;
-    ND_coord(leaf).x = lbound.x + ND_lw_i(leaf);
-    lbound.x = lbound.x + ND_lw_i(leaf) + ND_rw_i(leaf) + GD_nodesep(leaf->graph);
+    ND_coord(leaf).x = lbound.x + ND_lw(leaf);
+    lbound.x = lbound.x + ND_lw(leaf) + ND_rw(leaf) + GD_nodesep(leaf->graph);
     return lbound;
 }
 
@@ -1081,7 +1082,7 @@ static void do_leaves(graph_t * g, node_t * leader)
 
     if (ND_UF_size(leader) <= 1)
        return;
-    lbound.x = ND_coord(leader).x - ND_lw_i(leader);
+    lbound.x = ND_coord(leader).x - ND_lw(leader);
     lbound.y = ND_coord(leader).y;
     lbound = resize_leaf(leader, lbound);
     if (ND_out(leader).size > 0) {     /* in-edge leaves */
@@ -1203,11 +1204,10 @@ static void contain_nodes(graph_t * g)
            continue;
        }
        make_aux_edge(ln, v,
-                     ND_lw_i(v) + CL_OFFSET + GD_border(g)[LEFT_IX].x, 0);
+                     ND_lw(v) + CL_OFFSET + GD_border(g)[LEFT_IX].x, 0);
        v = GD_rank(g)[r].v[GD_rank(g)[r].n - 1];
        make_aux_edge(v, rn,
-                     ND_rw_i(v) + CL_OFFSET + GD_border(g)[RIGHT_IX].x,
-                     0);
+                     ND_rw(v) + CL_OFFSET + GD_border(g)[RIGHT_IX].x, 0);
     }
 }
 
index 508a77ce42b64434c94476b1d6502f5b105aafe3..932d7c100113c677839e018f4dfd7c1da3cd9a16 100644 (file)
@@ -499,9 +499,9 @@ merge_leaves(graph_t * g, node_t * cur, node_t * new)
        rv = new;
     else {
        rv = UF_union(cur, new);
-       ND_ht_i(rv) = MAX(ND_ht_i(cur), ND_ht_i(new));
-       ND_lw_i(rv) = ND_lw_i(cur) + ND_lw_i(new) + GD_nodesep(g) / 2;
-       ND_rw_i(rv) = ND_rw_i(cur) + ND_rw_i(new) + GD_nodesep(g) / 2;
+       ND_ht(rv) = MAX(ND_ht(cur), ND_ht(new));
+       ND_lw(rv) = ND_lw(cur) + ND_lw(new) + GD_nodesep(g) / 2;
+       ND_rw(rv) = ND_rw(cur) + ND_rw(new) + GD_nodesep(g) / 2;
     }
     return rv;
 }
index c2a827175193fcbb0c95d285b8d988171ec021e0..da99396dbc69c59a42ac4c3428e9bd9d328454be 100644 (file)
@@ -138,7 +138,7 @@ static void sameport(node_t * u, elist * l, double arr_len)
     /* (x1,y1),(x2,y2) is a segment that must cross the node boundary */
     x1 = ND_coord(u).x;
     y1 = ND_coord(u).y;        /* center of node */
-    r = MAX(ND_lw_i(u) + ND_rw_i(u), ND_ht_i(u) + GD_ranksep(u->graph));       /* far away */
+    r = MAX(ND_lw(u) + ND_rw(u), ND_ht(u) + GD_ranksep(u->graph));     /* far away */
     x2 = x * r + ND_coord(u).x;
     y2 = y * r + ND_coord(u).y;
     {                          /* now move (x1,y1) to the node boundary */
@@ -162,7 +162,7 @@ static void sameport(node_t * u, elist * l, double arr_len)
     prt.p.y = ROUND(y1);
     prt.bp = 0;
     prt.order =
-       (MC_SCALE * (ND_lw_i(u) + prt.p.x)) / (ND_lw_i(u) + ND_rw_i(u));
+       (MC_SCALE * (ND_lw(u) + prt.p.x)) / (ND_lw(u) + ND_rw(u));
     prt.constrained = FALSE;
     prt.defined = TRUE;
     prt.clip = FALSE;
index 9306b2acb3c2efe311577f374338e02a25a0ab33..c31e3bb223a4763dc8428ddbd41c3a8fef1b7482 100644 (file)
@@ -808,17 +808,17 @@ setClustNodes(graph_t* root)
        ND_width(n) = w;
        ND_height(n) = h;
        ND_xsize(n) = POINTS(w);
-       ND_lw_i(n) = ND_rw_i(n) = w2;
-       ND_ht_i(n) = ND_ysize(n) = h_i;
+       ND_lw(n) = ND_rw(n) = w2;
+       ND_ht(n) = ND_ysize(n) = h_i;
 
        vertices = ((polygon_t *) ND_shape_info(n))->vertices;
-       vertices[0].x = ND_rw_i(n);
+       vertices[0].x = ND_rw(n);
        vertices[0].y = h2;
-       vertices[1].x = -ND_lw_i(n);
+       vertices[1].x = -ND_lw(n);
        vertices[1].y = h2;
-       vertices[2].x = -ND_lw_i(n);
+       vertices[2].x = -ND_lw(n);
        vertices[2].y = -h2;
-       vertices[3].x = ND_rw_i(n);
+       vertices[3].x = ND_rw(n);
        vertices[3].y = -h2;
     }
 }
index a6f2264833c4e583b41ee32fad774002337a8bf8..dd81befea700a3a9fcb5e1fdfe622bd5b7b3fd0b 100644 (file)
@@ -578,12 +578,12 @@ Ppoly_t *makeObstacle(node_t * n, expand_t* pmargin)
                c = cos(2.0 * M_PI * j / sides + adj);
                s = sin(2.0 * M_PI * j / sides + adj);
                if (pmargin->doAdd) {
-                   polyp.x =  c*(ND_lw_i(n)+ND_rw_i(n)+pmargin->x) / 2.0;
-                   polyp.y =  s*(ND_ht_i(n)+pmargin->y) / 2.0;
+                   polyp.x =  c*(ND_lw(n)+ND_rw(n)+pmargin->x) / 2.0;
+                   polyp.y =  s*(ND_ht(n)+pmargin->y) / 2.0;
                }
                else {
-                   polyp.x = pmargin->x * c * (ND_lw_i(n) + ND_rw_i(n)) / 2.0;
-                   polyp.y = pmargin->y * s * ND_ht_i(n) / 2.0;
+                   polyp.x = pmargin->x * c * (ND_lw(n) + ND_rw(n)) / 2.0;
+                   polyp.y = pmargin->y * s * ND_ht(n) / 2.0;
                }
            }
            obs->ps[sides - j - 1].x = polyp.x + ND_coord(n).x;
@@ -619,16 +619,16 @@ Ppoly_t *makeObstacle(node_t * n, expand_t* pmargin)
        /* CW order */
        pt = ND_coord(n);
        if (pmargin->doAdd) {
-           obs->ps[0] = genPt(-ND_lw_i(n)-pmargin->x, -ND_ht_i(n)-pmargin->y,pt);
-           obs->ps[1] = genPt(-ND_lw_i(n)-pmargin->x, ND_ht_i(n)+pmargin->y,pt);
-           obs->ps[2] = genPt(ND_rw_i(n)+pmargin->x, ND_ht_i(n)+pmargin->y,pt);
-           obs->ps[3] = genPt(ND_rw_i(n)+pmargin->x, -ND_ht_i(n)-pmargin->y,pt);
+           obs->ps[0] = genPt(-ND_lw(n)-pmargin->x, -ND_ht(n)-pmargin->y,pt);
+           obs->ps[1] = genPt(-ND_lw(n)-pmargin->x, ND_ht(n)+pmargin->y,pt);
+           obs->ps[2] = genPt(ND_rw(n)+pmargin->x, ND_ht(n)+pmargin->y,pt);
+           obs->ps[3] = genPt(ND_rw(n)+pmargin->x, -ND_ht(n)-pmargin->y,pt);
        }
        else {
-           obs->ps[0] = recPt(-ND_lw_i(n), -ND_ht_i(n), pt, pmargin);
-           obs->ps[1] = recPt(-ND_lw_i(n), ND_ht_i(n), pt, pmargin);
-           obs->ps[2] = recPt(ND_rw_i(n), ND_ht_i(n), pt, pmargin);
-           obs->ps[3] = recPt(ND_rw_i(n), -ND_ht_i(n), pt, pmargin);
+           obs->ps[0] = recPt(-ND_lw(n), -ND_ht(n), pt, pmargin);
+           obs->ps[1] = recPt(-ND_lw(n), ND_ht(n), pt, pmargin);
+           obs->ps[2] = recPt(ND_rw(n), ND_ht(n), pt, pmargin);
+           obs->ps[3] = recPt(ND_rw(n), -ND_ht(n), pt, pmargin);
        }
        break;
     default:
index 1dd6f4e2c45459cbbf53b56f603205698de5f500..be0cbd5d055c59283e63749666113aa4a1e7ffda 100644 (file)
@@ -213,8 +213,8 @@ static void ptest_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));
+    ND_lw(n) = ND_rw(n) = w / 2;
+    ND_ht(n) = ND_ysize(n) = POINTS(ND_height(n));
 }
 
 
index 56c40312563f392498e65b148c07c67625818406..620c43068a9daac1fc157bbd36170e68affc65d8 100644 (file)
@@ -182,8 +182,8 @@ static rect_t walker(treenode_t *tree)
                        gv_nodesize(n,GD_flip(n->graph));
                        finishNode (n);
                        /*fprintf(stderr,"%s coord %.3g %.3g ht %d width %d\n",
-                               n->name, ND_coord(n).x, ND_coord(n).y, ND_ht_i(n),
-                               ND_rw_i(n)+ND_lw_i(n));*/
+                               n->name, ND_coord(n).x, ND_coord(n).y, ND_ht(n),
+                               ND_rw(n)+ND_lw(n));*/
                        break;
                default: abort();
        }
index b0b9d3b8cb3e1f7f4719ec6b8c8fb1b3fe121fff..66f69ee8b9a07a0be2b2843b4a100078e955443a 100644 (file)
@@ -605,8 +605,8 @@ int box_connection(node_t * n, pointf p)
        A = malloc(A_size*sizeof(pointf));
     }
 
-    xsize = ((ND_lw_i(n) + ND_rw_i(n)) / POINTS(ND_width(n))) * 16.0;
-    ysize = ((ND_ht_i(n)) / POINTS(ND_height(n))) * 16.0;
+    xsize = ((ND_lw(n) + ND_rw(n)) / POINTS(ND_width(n))) * 16.0;
+    ysize = ((ND_ht(n)) / POINTS(ND_height(n))) * 16.0;
 
     for (j = 0; j < peripheries; j++) {
        for (i = 0; i < sides; i++) {
index 67a1bc51239b327d86db03c3220d28a4d510ce38..c935a06ba8c6f29c2fc07e2b1058f83bcbdaf2b5 100644 (file)
@@ -136,11 +136,11 @@ static pointf vrml_node_point(GVJ_t *job, node_t *n, pointf p)
 
     /* make rv relative to PNG canvas */
     if (job->rotation) {
-       rv.x = ( (p.y - job->pad.y) - ND_coord(n).y + ND_lw_i(n)     ) * Scale + NODE_PAD;
-       rv.y = (-(p.x - job->pad.x) + ND_coord(n).x + ND_ht_i(n) / 2.) * Scale + NODE_PAD;
+       rv.x = ( (p.y - job->pad.y) - ND_coord(n).y + ND_lw(n)     ) * Scale + NODE_PAD;
+       rv.y = (-(p.x - job->pad.x) + ND_coord(n).x + ND_ht(n) / 2.) * Scale + NODE_PAD;
     } else {
-       rv.x = ( (p.x - job->pad.x) - ND_coord(n).x + ND_lw_i(n)     ) * Scale + NODE_PAD;
-       rv.y = (-(p.y - job->pad.y) + ND_coord(n).y + ND_ht_i(n) / 2.) * Scale + NODE_PAD;
+       rv.x = ( (p.x - job->pad.x) - ND_coord(n).x + ND_lw(n)     ) * Scale + NODE_PAD;
+       rv.y = (-(p.y - job->pad.y) + ND_coord(n).y + ND_ht(n) / 2.) * Scale + NODE_PAD;
     }
     return rv;
 }
@@ -256,8 +256,8 @@ static void vrml_begin_node(GVJ_t *job)
     if (shapeOf(n) != SH_POINT) {
        PNGfile = nodefile(job->output_filename, n);
 
-       width  = (ND_lw_i(n) + ND_rw_i(n)) * Scale + 2 * NODE_PAD;
-       height = (ND_ht_i(n)             ) * Scale + 2 * NODE_PAD;
+       width  = (ND_lw(n) + ND_rw(n)) * Scale + 2 * NODE_PAD;
+       height = (ND_ht(n)           ) * Scale + 2 * NODE_PAD;
        im = gdImageCreate(width, height);
 
        /* make background transparent */