COIN-OR::LEMON - Graph Library

Changeset 178:a96d2a540454 in glemon-0.x


Ignore:
Timestamp:
10/30/06 16:43:13 (17 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@3035
Message:

If visualization is not autoscaled, edges with widths associated with negative map values will be hidden.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • graph_displayer_canvas-edge.cc

    r174 r178  
    7777      for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i)
    7878        {
    79           double v=fabs((*actual_map)[i]);
     79          double v=(*actual_map)[i];
    8080          int w;
    8181          if(autoscale)
     
    9494              w=(int)(v*edge_width);
    9595            }
    96           if(w<minimum_edge_width)
    97             {
    98               w=minimum_edge_width;
    99             }
    100           if(zoomtrack)
    101             {
    102               double actual_ppu=get_pixels_per_unit();
    103               w=(int)(w/actual_ppu*fixed_zoom_factor);
    104             }
    105           edgesmap[i]->setLineWidth(w);
     96          if(w<0)
     97            {
     98              edgesmap[i]->hide();
     99            }
     100          else
     101            {
     102              edgesmap[i]->show();
     103              if(w<minimum_edge_width)
     104                {
     105                  w=minimum_edge_width;
     106                }
     107              if(zoomtrack)
     108                {
     109                  double actual_ppu=get_pixels_per_unit();
     110                  w=(int)(w/actual_ppu*fixed_zoom_factor);
     111                }
     112              edgesmap[i]->setLineWidth(w);
     113            }
    106114        }
    107115    }
  • graph_displayer_canvas-event.cc

    r174 r178  
    262262    case GDK_BUTTON_RELEASE:
    263263      (mytab.mapstorage).modified = true;
     264
     265      is_drawn=true;
    264266
    265267      isbutton=1;
Note: See TracChangeset for help on using the changeset viewer.