From: erg Date: Sun, 14 Jan 2007 22:29:50 +0000 (+0000) Subject: Fix bug 1064 X-Git-Tag: LAST_LIBGRAPH~32^2~5711 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aafac62c553b989f70bbc52997282149b16dc4b9;p=graphviz Fix bug 1064 --- diff --git a/lib/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index 88beba039..17d64bb75 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -212,10 +212,15 @@ static void edge_normalize(graph_t * g) } } -/* dot_splines: +/* _dot_splines: + * Main spline routing code. + * The normalize parameter allows this function to be called by the + * recursive call in make_flat_edge without normalization occurring, + * so that the edge will only be normalized once in the top level call + * of dot_splines. * If the splines attribute is defined but equal to "", skip edge routing. */ -void dot_splines(graph_t * g) +static void _dot_splines(graph_t * g, int normalize) { int i, j, k, n_nodes, n_edges, ind, cnt; node_t *n; @@ -381,7 +386,8 @@ void dot_splines(graph_t * g) /* normalize splines so they always go from tail to head */ /* place_portlabel relies on this being done first */ - edge_normalize(g); + if (normalize) + edge_normalize(g); /* vladimir: place port labels */ /* FIX: head and tail labels are not part of cluster bbox */ @@ -414,6 +420,14 @@ void dot_splines(graph_t * g) State = GVSPLINES; } +/* dot_splines: + * If the splines attribute is defined but equal to "", skip edge routing. + */ +void dot_splines(graph_t * g) +{ + _dot_splines (g, 1); +} + /* place_vnlabel: * assign position of an edge label from its virtual node * This is for regular edges only. @@ -846,7 +860,7 @@ make_flat_adj_edges(path* P, edge_t** edges, int ind, int cnt, edge_t* e0) else ND_coord_i(n).y = midx; } dot_sameports(auxg); - dot_splines(auxg); + _dot_splines(auxg, 0); dotneato_postprocess(auxg); /* copy splines */