extern void pop_obj_state(GVJ_t *job);
extern obj_state_t* push_obj_state(GVJ_t *job);
extern int rank(graph_t * g, int balance, int maxiter);
+ extern port resolvePort(node_t* n, node_t* other, port* oldport);
extern void resolvePorts (edge_t* e);
extern void round_corners(GVJ_t*, char*, char*, pointf*, int, int);
extern void routesplinesinit(void);
#define RBCONST 12
#define RBCURVE .5
-static port Center = { {0, 0}, -1, 0, 0, 0, 1, 0, 0 };
+static port Center = { {0, 0}, -1, 0, 0, 0, 1, 0, 0, 0 };
#define ATTR_SET(a,n) ((a) && (*(agxget(n,a->index)) != '\0'))
/* Default point size = 0.05 inches or 3.6 points */
fputs(" ", stderr);
}
-static void prbox(box b)
+static void prbox(boxf b)
{
- fprintf(stderr, "((%d,%d),(%d,%d))\n", b.LL.x, b.LL.y, b.UR.x, b.UR.y);
+ fprintf(stderr, "((%f,%f),(%f,%f))\n", b.LL.x, b.LL.y, b.UR.x, b.UR.y);
}
static void dumpL(field_t * info, int level)
return rv;
}
-static port resolvePort(node_t* n, node_t* other, port* oldport)
+port
+resolvePort(node_t* n, node_t* other, port* oldport)
{
port rv;
char* compass = closestSide (n, other, oldport);
n = e->tail;
+ if (ED_tail_port(e).dyna)
+ ED_tail_port(e) = resolvePort(e->tail, e->head, &ED_tail_port(e));
if (ND_shape(n))
pboxfn = ND_shape(n)->fns->pboxfn;
else
n = e->head;
+ if (ED_head_port(e).dyna)
+ ED_head_port(e) = resolvePort(e->head, e->tail, &ED_head_port(e));
if (ND_shape(n))
pboxfn = ND_shape(n)->fns->pboxfn;
else
}
}
- for (i = 0; i < n_edges; i++)
- resolvePorts (getmainedge(edges[i]));
-
/* Sort so that equivalent edges are contiguous.
* Equivalence should basically mean that 2 edges have the
* same set {(tailnode,tailport),(headnode,headport)}, or
b = nb;
rv.LL.x = ROUND(b);
} else
- rv.LL.x = MIN(ROUND(b), sp->Splinesep);
+ rv.LL.x = MIN(ROUND(b), sp->LeftBound);
/* we have to leave room for our own label! */
if ((ND_node_type(vn) == VIRTUAL) && (ND_label(vn)))