From: erg Date: Tue, 15 Apr 2008 23:01:46 +0000 (+0000) Subject: Add more efficient loop for drawing edges X-Git-Tag: LAST_LIBGRAPH~32^2~4294 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2b104c58f9ac4c6c0af10cd9baaec7f51499281;p=graphviz Add more efficient loop for drawing edges --- diff --git a/cmd/smyrna/topview.c b/cmd/smyrna/topview.c index 5855c6ad3..d23f3082b 100755 --- a/cmd/smyrna/topview.c +++ b/cmd/smyrna/topview.c @@ -193,7 +193,7 @@ void preparetopview(Agraph_t * g, topview * t) t->topviewmenu = glcreate_gl_topview_menu(); attach_camera_widget(view); load_host_buttons(t, g, t->topviewmenu); - /* prepare_topological_fisheye(t); */ + prepare_topological_fisheye(t); } void drawTopViewGraph(Agraph_t * g) @@ -1286,8 +1286,17 @@ void prepare_topological_fisheye(topview * t) for (e=1;e < gg[v].nedges;e++) { double x,y; - find_physical_coords(hp,level,gg[v].edges[e], &x, &y); - fprintf (stderr, "(%f,%f) -- (%f,%f)\n", x0, y0, x, y); + if (gg[e].active_level == level) { + if (v < e) { + x = gg[3].physical_x_coord; + y = gg[3].physical_y_coord; + fprintf (stderr, "(%f,%f) -- (%f,%f)\n", x0, y0, x, y); + } + } + else if (gg[e].active_level > level) { + find_physical_coords(hp,level,gg[v].edges[e], &x, &y); + fprintf (stderr, "(%f,%f) -- (%f,%f)\n", x0, y0, x, y); + } } } }