COIN-OR::LEMON - Graph Library

Changeset 113:7c2e71835de7 in glemon-0.x


Ignore:
Timestamp:
01/06/06 15:44:04 (18 years ago)
Author:
Akos Ladanyi
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2458
Message:

Set arrow coordinates when creating a new edge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • graph_displayer_canvas-event.cc

    r109 r113  
    453453              target_item->get_bounds(x1, y1, x2, y2);
    454454              coos.push_back(Gnome::Art::Point((x1+x2)/2,(y1+y2)/2));
     455
     456              // set the coordinates of the arrow on the new edge
     457              MapStorage& ms = mytab.mapstorage;
     458              ms.arrow_pos.set(active_edge,
     459                  (ms.coords[ms.graph.source(active_edge)] +
     460                   ms.coords[ms.graph.target(active_edge)])/ 2.0);
    455461
    456462              //drawing new edge
Note: See TracChangeset for help on using the changeset viewer.