COIN-OR::LEMON - Graph Library

Changeset 151:72f1c33f89d4 in glemon-0.x for graph_displayer_canvas.cc


Ignore:
Timestamp:
09/25/06 09:54:00 (15 years ago)
Author:
Akos Ladanyi
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@2953
Message:

LoopEdge? improvements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • graph_displayer_canvas.cc

    r150 r151  
    158158  for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i)
    159159  {
    160 
    161     //drawing green lines, coordinates are from mapstorage.coords
    162 
    163     Gnome::Canvas::Points coos;
    164     coos.push_back(Gnome::Art::Point(
    165           (mytab.mapstorage).coords[(mytab.mapstorage).graph.source(i)].x,
    166           (mytab.mapstorage).coords[(mytab.mapstorage).graph.source(i)].y));
    167     coos.push_back(Gnome::Art::Point(
    168           (mytab.mapstorage).coords[(mytab.mapstorage).graph.target(i)].x,
    169           (mytab.mapstorage).coords[(mytab.mapstorage).graph.target(i)].y));
    170    
    171     edgesmap[i]=new BrokenEdge(displayed_graph, i, *this);
    172    
     160    if (mytab.mapstorage.graph.source(i) == mytab.mapstorage.graph.target(i))
     161    {
     162      edgesmap[i]=new LoopEdge(displayed_graph, i, *this);
     163    }
     164    else
     165    {
     166      edgesmap[i]=new BrokenEdge(displayed_graph, i, *this);
     167    }
    173168    //initializing edge-text as well, to empty string
    174169
Note: See TracChangeset for help on using the changeset viewer.