]> granicus.if.org Git - graphviz/commitdiff
Add more efficient loop for drawing edges
authorerg <devnull@localhost>
Tue, 15 Apr 2008 23:01:46 +0000 (23:01 +0000)
committererg <devnull@localhost>
Tue, 15 Apr 2008 23:01:46 +0000 (23:01 +0000)
cmd/smyrna/topview.c

index 5855c6ad3f197d10cb2ee63349f632ab5828112d..d23f3082be6a71028175f49b0ad9d6cf29eedbce 100755 (executable)
@@ -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);
+                   }
                }
            }
        }