diff -r 930e838ad5b6 -r 86273bfe0e4d graph_displayer_canvas-event.cc --- a/graph_displayer_canvas-event.cc Tue Sep 19 07:43:55 2006 +0000 +++ b/graph_displayer_canvas-event.cc Thu Sep 21 10:29:29 2006 +0000 @@ -134,7 +134,7 @@ double coord_y = new_y - (clicked_y - (mytab.mapstorage).coords[active_node].y); // write back the new coordinates to the coords map - (mytab.mapstorage).coords.set(active_node, xy(coord_x, coord_y)); + (mytab.mapstorage).coords.set(active_node, XY(coord_x, coord_y)); clicked_x=new_x; clicked_y=new_y; @@ -234,9 +234,9 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////// //old vector from one to the other node - a - xy a_v(moved_node_1.x-fix_node.x,moved_node_1.y-fix_node.y); + XY a_v(moved_node_1.x-fix_node.x,moved_node_1.y-fix_node.y); //new vector from one to the other node - b - xy b_v(moved_node_2.x-fix_node.x,moved_node_2.y-fix_node.y); + XY b_v(moved_node_2.x-fix_node.x,moved_node_2.y-fix_node.y); double absa=sqrt(a_v.normSquare()); double absb=sqrt(b_v.normSquare()); @@ -248,25 +248,25 @@ else { //old vector from one node to the breakpoint - c - xy c_v(old_arrow_pos.x-fix_node.x,old_arrow_pos.y-fix_node.y); + XY c_v(old_arrow_pos.x-fix_node.x,old_arrow_pos.y-fix_node.y); //unit vector with the same direction to a_v - xy a_v_u(a_v.x/absa,a_v.y/absa); + XY a_v_u(a_v.x/absa,a_v.y/absa); //normal vector of unit vector with the same direction to a_v - xy a_v_u_n(((-1)*a_v_u.y),a_v_u.x); + XY a_v_u_n(((-1)*a_v_u.y),a_v_u.x); //unit vector with the same direction to b_v - xy b_v_u(b_v.x/absb,b_v.y/absb); + XY b_v_u(b_v.x/absb,b_v.y/absb); //normal vector of unit vector with the same direction to b_v - xy b_v_u_n(((-1)*b_v_u.y),b_v_u.x); + XY b_v_u_n(((-1)*b_v_u.y),b_v_u.x); //vector c in a_v_u and a_v_u_n co-ordinate system - xy c_a(c_v*a_v_u,c_v*a_v_u_n); + XY c_a(c_v*a_v_u,c_v*a_v_u_n); //new vector from one node to the breakpoint - d - we have to calculate this one - xy d_v=absb/absa*(c_a.x*b_v_u+c_a.y*b_v_u_n); + XY d_v=absb/absa*(c_a.x*b_v_u+c_a.y*b_v_u_n); return XY(d_v.x+fix_node.x,d_v.y+fix_node.y); } @@ -305,7 +305,7 @@ window_to_world (e->button.x, e->button.y, clicked_x, clicked_y); // update coordinates - (mytab.mapstorage).coords.set(active_node, xy(clicked_x, clicked_y)); + (mytab.mapstorage).coords.set(active_node, XY(clicked_x, clicked_y)); // update all other maps for (std::map*>::const_iterator it = @@ -790,9 +790,9 @@ (mytab.mapstorage).graph.erase(edge_to_delete); } -void GraphDisplayerCanvas::textReposition(xy new_place) +void GraphDisplayerCanvas::textReposition(XY new_place) { - new_place+=(xy(10,10)); + new_place+=(XY(10,10)); edgetextmap[forming_edge]->property_x().set_value(new_place.x); edgetextmap[forming_edge]->property_y().set_value(new_place.y); }