Small modification in node view settings.
authorhegyi
Thu, 28 Sep 2006 09:26:48 +0000
changeset 15574065e83844d
parent 154 65c1b103443d
child 156 c5cdf6690cdf
Small modification in node view settings.
graph_displayer_canvas-node.cc
main_win.cc
     1.1 --- a/graph_displayer_canvas-node.cc	Mon Sep 25 15:30:04 2006 +0000
     1.2 +++ b/graph_displayer_canvas-node.cc	Thu Sep 28 09:26:48 2006 +0000
     1.3 @@ -1,6 +1,7 @@
     1.4  #include "graph_displayer_canvas.h"
     1.5  #include <cmath>
     1.6  
     1.7 +const int minimum_node_radius=0;
     1.8  
     1.9  int GraphDisplayerCanvas::changeNodeRadius (std::string mapname, Node node)
    1.10  {
    1.11 @@ -24,13 +25,19 @@
    1.12  		}
    1.13  	      else
    1.14  		{
    1.15 -		  w=(int)(radius_min+(v-min)/(max-min)*(radius_max-radius_min));
    1.16 +		  w=(int)(minimum_node_radius+(v-min)/(max-min)*(radius_max-minimum_node_radius));
    1.17  		}
    1.18  	    }
    1.19  	  else
    1.20  	    {
    1.21 -	      w=5+(int)(v/radius_unit);
    1.22 +	      w=(int)(v*radius_max);
    1.23  	    }
    1.24 +
    1.25 +	  if(w<5)
    1.26 +	    {
    1.27 +	      w=5;
    1.28 +	    }
    1.29 +
    1.30  	  if(w>=0)
    1.31  	    {
    1.32  	      double x1, y1, x2, y2;
     2.1 --- a/main_win.cc	Mon Sep 25 15:30:04 2006 +0000
     2.2 +++ b/main_win.cc	Thu Sep 28 09:26:48 2006 +0000
     2.3 @@ -210,27 +210,27 @@
     2.4    table2.attach(*auto_scale, 0,2,0,1);
     2.5   
     2.6    Gtk::Label * unit_label= new Gtk::Label("Unit:");
     2.7 -  table2.attach(*unit_label, 2,3,0,1);
     2.8 +//   table2.attach(*unit_label, 2,3,0,1);
     2.9    
    2.10    Gtk::Adjustment * adjustment_unit=new Gtk::Adjustment(20, 5, 200, 5, 10);
    2.11  
    2.12    radius_unit = new Gtk::SpinButton(*adjustment_unit, 5,0);
    2.13    radius_unit->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged));
    2.14 -  table2.attach(*radius_unit, 3,4,0,1);
    2.15 +//   table2.attach(*radius_unit, 3,4,0,1);
    2.16  
    2.17    Gtk::Label * min_label= new Gtk::Label("Min:");
    2.18 -  table2.attach(*min_label, 0,1,1,2);
    2.19 +//   table2.attach(*min_label, 0,1,1,2);
    2.20    
    2.21    Gtk::Adjustment * adjustment_min=new Gtk::Adjustment(20, 5, 200, 5, 10);
    2.22  
    2.23    radius_min = new Gtk::SpinButton(*adjustment_min, 5,0);
    2.24    radius_min->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged));
    2.25 -  table2.attach(*radius_min, 1,2,1,2);
    2.26 +//   table2.attach(*radius_min, 1,2,1,2);
    2.27  
    2.28 -  Gtk::Label * max_label= new Gtk::Label("Max:");
    2.29 +  Gtk::Label * max_label= new Gtk::Label("Size:");
    2.30    table2.attach(*max_label, 2,3,1,2);
    2.31    
    2.32 -  Gtk::Adjustment * adjustment_max=new Gtk::Adjustment(20, 5, 200, 5, 10);
    2.33 +  Gtk::Adjustment * adjustment_max=new Gtk::Adjustment(20, 0, 200, 5, 10);
    2.34  
    2.35    radius_max = new Gtk::SpinButton(*adjustment_max, 5,0);
    2.36    radius_max->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged));