From: erg Date: Tue, 15 Apr 2008 22:41:05 +0000 (+0000) Subject: Fix makeHier to initialize physical coordinates X-Git-Tag: LAST_LIBGRAPH~32^2~4295 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=738cc82918e635be0232465b3bc8c20a4e83e8cb;p=graphviz Fix makeHier to initialize physical coordinates --- diff --git a/cmd/smyrna/hier.c b/cmd/smyrna/hier.c index 3524dc037..619e31ab1 100644 --- a/cmd/smyrna/hier.c +++ b/cmd/smyrna/hier.c @@ -235,6 +235,7 @@ Hierarchy *makeHier(int nn, int ne, vtx_data * graph, double *x_coords, ex_vtx_data *geom_graph; int ngeom_edges; Hierarchy *hp; + int i; delaunay = UG_graph(x_coords, y_coords, nn, 0); @@ -249,6 +250,11 @@ Hierarchy *makeHier(int nn, int ne, vtx_data * graph, double *x_coords, free(geom_graph); init_active_level(hp, 0); + geom_graph = hp->geom_graphs[0]; + for (i = 0; i < hp->nvtxs[0]; i++) { + geom_graph[i].physical_x_coord = (float) x_coords[i]; + geom_graph[i].physical_y_coord = (float) y_coords[i]; + } return hp; }