COIN-OR::LEMON - Graph Library

Changeset 154:65c1b103443d in glemon-0.x for graph_displayer_canvas-node.cc


Ignore:
Timestamp:
09/25/06 17:30:04 (18 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@2958
Message:

Node view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • graph_displayer_canvas-node.cc

    r96 r154  
    1717          double v=fabs((*actual_map)[i]);
    1818          int w;
    19           if(min==max)
    20             {
    21               w=(int)(node_property_defaults[N_RADIUS]);
    22             }
    23           else
    24             {
    25               w=(int)(MIN_NODE_RADIUS+(v-min)/(max-min)*(MAX_NODE_RADIUS-MIN_NODE_RADIUS));
     19          if(autoscale)
     20            {
     21              if(min==max)
     22                {
     23                  w=(int)(node_property_defaults[N_RADIUS]);
     24                }
     25              else
     26                {
     27                  w=(int)(radius_min+(v-min)/(max-min)*(radius_max-radius_min));
     28                }
     29            }
     30          else
     31            {
     32              w=5+(int)(v/radius_unit);
    2633            }
    2734          if(w>=0)
     
    4249    {
    4350      //I think only new nodes use this case
    44 //       int w=(int)(*actual_map)[node];
     51      //that has no own value, only the default one
     52      //int w=(int)(*actual_map)[node];
    4553      int w=(int)(node_property_defaults[N_RADIUS]);
    4654      if(w>=0)
Note: See TracChangeset for help on using the changeset viewer.