graph_displayer_canvas-edge.cc
branchgui
changeset 62 80eefca04b1e
parent 59 c38925cc6a4d
child 63 59768817442a
equal deleted inserted replaced
12:f66222b0eb5d 13:de3028325d67
     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::changeEdgeWidth (std::string mapname, Graph::Edge edge)
     6 int GraphDisplayerCanvas::changeEdgeWidth (std::string mapname, Edge edge)
     7 {
     7 {
     8   Graph::EdgeMap<double> * actual_map;
     8   Graph::EdgeMap<double> * actual_map;
     9   double min, max;
     9   double min, max;
    10 
    10 
    11   if(mapname=="Default")
    11   if(mapname=="Default")
    47 	}
    47 	}
    48     }
    48     }
    49   return 0;
    49   return 0;
    50 };
    50 };
    51 
    51 
    52 int GraphDisplayerCanvas::changeEdgeColor (std::string mapname, Graph::Edge edge)
    52 int GraphDisplayerCanvas::changeEdgeColor (std::string mapname, Edge edge)
    53 {  
    53 {  
    54 
    54 
    55   //function maps the range of the maximum and
    55   //function maps the range of the maximum and
    56   //the minimum of the nodemap to the range of
    56   //the minimum of the nodemap to the range of
    57   //green in RGB
    57   //green in RGB
   114       edgesmap[edge]->property_fill_color_gdk().set_value(color);
   114       edgesmap[edge]->property_fill_color_gdk().set_value(color);
   115     }
   115     }
   116   return 0;
   116   return 0;
   117 };
   117 };
   118 
   118 
   119 int GraphDisplayerCanvas::changeEdgeText (std::string mapname, Graph::Edge edge)
   119 int GraphDisplayerCanvas::changeEdgeText (std::string mapname, Edge edge)
   120 {
   120 {
   121   //the number in the map will be written on the edge
   121   //the number in the map will be written on the edge
   122   //EXCEPT when the name of the map is Default, because
   122   //EXCEPT when the name of the map is Default, because
   123   //in that case empty string will be written, because
   123   //in that case empty string will be written, because
   124   //that is the deleter map
   124   //that is the deleter map