32 static void sameport(
node_t * u,
elist * l,
double arr_len);
51 n_samehead = n_sametail = 0;
56 n_samehead = sameedge(samehead, n_samehead, n, e,
id);
59 n_sametail = sameedge(sametail, n_sametail, n, e,
id);
61 for (i = 0; i < n_samehead; i++) {
62 if (samehead[i].l.size > 1)
63 sameport(n, &samehead[i].l, samehead[i].arr_len);
67 for (i = 0; i < n_sametail; i++) {
68 if (sametail[i].l.size > 1)
69 sameport(n, &sametail[i].l, sametail[i].arr_len);
79 int i, sflag, eflag, flag;
81 for (i = 0; i < n_same; i++)
82 if (
streq(same[i].
id,
id)) {
88 agerr(
AGERR,
"too many (> %d) same{head,tail} groups for node %s\n",
99 if ((flag =
aghead(e) == n ? eflag : sflag))
106 static void sameport(
node_t * u,
elist * l,
double arr_len)
119 double x = 0, y = 0, x1, y1, x2, y2, r;
130 for (i = 0; i < l->
size; i++) {
156 curve[1].
x = (2 * x1 + x2) / 3;
157 curve[1].
y = (2 * y1 + y2) / 3;
158 curve[2].
x = (2 * x2 + x1) / 3;
159 curve[2].
y = (2 * y2 + y1) / 3;
197 arr_prt.
p.
x =
ROUND(x1 + x * arr_len);
198 arr_prt.
p.
y =
ROUND(y1 + y * arr_len);
203 (
MC_SCALE * (ND_lw_i(u) + arr_prt.
p.
x)) / (ND_lw_i(u) +
207 if (u == l->
list[0]->head) {
209 (ht =
ABS(arr_prt.
p.
y)))
213 (ht =
ABS(arr_prt.
p.
y)))
220 for (i = 0; i < l->
size; i++) {
250 arr_port.defined && !eflag ? arr_prt : prt;
253 arr_port.defined && !sflag ? arr_prt : prt;
Agsym_t * agattr(Agraph_t *g, int kind, char *name, char *value)
#define elist_append(item, L)
void dot_sameports(Agraph_t *)
CGRAPH_API Agedge_t * agfstedge(Agraph_t *g, Agnode_t *n)
#define alloc_elist(n, L)
int agerr(agerrlevel_t level, const char *fmt,...)
void arrow_flags(Agedge_t *e, int *sflag, int *eflag)
double arrow_length(edge_t *e, int flag)
EXTERN Agsym_t * E_sametail
CGRAPH_API Agraph_t * agraphof(void *obj)
CGRAPH_API Agnode_t * agtail(Agedge_t *e)
CGRAPH_API Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
CGRAPH_API Agnode_t * aghead(Agedge_t *e)
CGRAPH_API char * agnameof(void *)
CGRAPH_API Agnode_t * agfstnode(Agraph_t *g)
#define elist_fastapp(item, L)
CGRAPH_API Agedge_t * agnxtedge(Agraph_t *g, Agedge_t *e, Agnode_t *n)
void shape_clip(node_t *n, pointf curve[4])
EXTERN Agsym_t * E_samehead
char * agxget(void *obj, Agsym_t *sym)