From e2b104c58f9ac4c6c0af10cd9baaec7f51499281 Mon Sep 17 00:00:00 2001 From: erg Date: Tue, 15 Apr 2008 23:01:46 +0000 Subject: [PATCH] Add more efficient loop for drawing edges --- cmd/smyrna/topview.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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); + } } } } -- 2.40.0