diff -r c5cdf6690cdf -r 7e6ad28aeb9e graph_displayer_canvas-edge.cc --- a/graph_displayer_canvas-edge.cc Thu Sep 28 14:32:40 2006 +0000 +++ b/graph_displayer_canvas-edge.cc Mon Oct 02 18:52:00 2006 +0000 @@ -1,6 +1,7 @@ #include "graph_displayer_canvas.h" #include +const int minimum_edge_width=2; int GraphDisplayerCanvas::resetEdgeWidth (Edge edge) { @@ -24,6 +25,11 @@ { w=(int)(MIN_EDGE_WIDTH+(v-min)/(max-min)*(MAX_EDGE_WIDTH-MIN_EDGE_WIDTH)); } + if(zoomtrack) + { + double actual_ppu=get_pixels_per_unit(); + w=(int)(w/actual_ppu*fixed_zoom_factor); + } edgesmap[i]->setLineWidth(w); } } @@ -54,13 +60,29 @@ { double v=fabs((*actual_map)[i]); int w; - if(min==max) + if(autoscale) { - w=(int)(edge_property_defaults[E_WIDTH]); + if(min==max) + { + w=(int)(edge_property_defaults[E_WIDTH]); + } + else + { + w=(int)(minimum_edge_width+(v-min)/(max-min)*(edge_width-minimum_edge_width)); + } } else { - w=(int)(MIN_EDGE_WIDTH+(v-min)/(max-min)*(MAX_EDGE_WIDTH-MIN_EDGE_WIDTH)); + w=(int)(v*edge_width); + } + if(wsetLineWidth(w); }