gui/graph_displayer_canvas-node.cc
changeset 1688 61ce46476787
parent 1632 93ac8c521fe5
child 1731 616bc933c2bc
equal deleted inserted replaced
8:88e98611fa85 9:2acc961be4d9
     1 #include "graph_displayer_canvas.h"
     1 #include "graph_displayer_canvas.h"
     2 #include "broken_edge.h"
     2 #include "broken_edge.h"
     3 #include <cmath>
     3 #include <cmath>
     4 
     4 
     5 
     5 
     6 int GraphDisplayerCanvas::changeNodeRadius (std::string mapname, Graph::Node node)
     6 int GraphDisplayerCanvas::changeNodeRadius (std::string mapname, Node node)
     7 {
     7 {
     8   Graph::NodeMap<double> * actual_map;
     8   Graph::NodeMap<double> * actual_map;
     9   double min, max;
     9   double min, max;
    10   if(mapname=="Default")
    10   if(mapname=="Default")
    11     {
    11     {
    67 	}
    67 	}
    68     }
    68     }
    69   return 0;
    69   return 0;
    70 };
    70 };
    71 
    71 
    72 int GraphDisplayerCanvas::changeNodeColor (std::string mapname, Graph::Node node)
    72 int GraphDisplayerCanvas::changeNodeColor (std::string mapname, Node node)
    73 {  
    73 {  
    74 
    74 
    75   //function maps the range of the maximum and
    75   //function maps the range of the maximum and
    76   //the minimum of the nodemap to the range of
    76   //the minimum of the nodemap to the range of
    77   //green in RGB
    77   //green in RGB
   139       nodesmap[node]->property_fill_color_gdk().set_value(color);
   139       nodesmap[node]->property_fill_color_gdk().set_value(color);
   140     }
   140     }
   141   return 0;
   141   return 0;
   142 };
   142 };
   143 
   143 
   144 int GraphDisplayerCanvas::changeNodeText (std::string mapname, Graph::Node node)
   144 int GraphDisplayerCanvas::changeNodeText (std::string mapname, Node node)
   145 {
   145 {
   146 
   146 
   147   //the number in the map will be written on the node
   147   //the number in the map will be written on the node
   148   //EXCEPT when the name of the map is Text, because
   148   //EXCEPT when the name of the map is Text, because
   149   //in that case empty string will be written, because
   149   //in that case empty string will be written, because