155 { |
155 { |
156 //first edges are drawn, to hide joining with nodes later |
156 //first edges are drawn, to hide joining with nodes later |
157 |
157 |
158 for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i) |
158 for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i) |
159 { |
159 { |
160 |
160 if (mytab.mapstorage.graph.source(i) == mytab.mapstorage.graph.target(i)) |
161 //drawing green lines, coordinates are from mapstorage.coords |
161 { |
162 |
162 edgesmap[i]=new LoopEdge(displayed_graph, i, *this); |
163 Gnome::Canvas::Points coos; |
163 } |
164 coos.push_back(Gnome::Art::Point( |
164 else |
165 (mytab.mapstorage).coords[(mytab.mapstorage).graph.source(i)].x, |
165 { |
166 (mytab.mapstorage).coords[(mytab.mapstorage).graph.source(i)].y)); |
166 edgesmap[i]=new BrokenEdge(displayed_graph, i, *this); |
167 coos.push_back(Gnome::Art::Point( |
167 } |
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 |
|
173 //initializing edge-text as well, to empty string |
168 //initializing edge-text as well, to empty string |
174 |
169 |
175 XY text_pos=mytab.mapstorage.arrow_pos[i]; |
170 XY text_pos=mytab.mapstorage.arrow_pos[i]; |
176 text_pos+=(XY(10,10)); |
171 text_pos+=(XY(10,10)); |
177 |
172 |