1.1 --- a/graph_displayer_canvas-event.cc Tue Sep 19 07:43:55 2006 +0000
1.2 +++ b/graph_displayer_canvas-event.cc Thu Sep 21 10:29:29 2006 +0000
1.3 @@ -134,7 +134,7 @@
1.4 double coord_y = new_y - (clicked_y - (mytab.mapstorage).coords[active_node].y);
1.5
1.6 // write back the new coordinates to the coords map
1.7 - (mytab.mapstorage).coords.set(active_node, xy<double>(coord_x, coord_y));
1.8 + (mytab.mapstorage).coords.set(active_node, XY(coord_x, coord_y));
1.9
1.10 clicked_x=new_x;
1.11 clicked_y=new_y;
1.12 @@ -234,9 +234,9 @@
1.13 //////////////////////////////////////////////////////////////////////////////////////////////////////
1.14
1.15 //old vector from one to the other node - a
1.16 - xy<double> a_v(moved_node_1.x-fix_node.x,moved_node_1.y-fix_node.y);
1.17 + XY a_v(moved_node_1.x-fix_node.x,moved_node_1.y-fix_node.y);
1.18 //new vector from one to the other node - b
1.19 - xy<double> b_v(moved_node_2.x-fix_node.x,moved_node_2.y-fix_node.y);
1.20 + XY b_v(moved_node_2.x-fix_node.x,moved_node_2.y-fix_node.y);
1.21
1.22 double absa=sqrt(a_v.normSquare());
1.23 double absb=sqrt(b_v.normSquare());
1.24 @@ -248,25 +248,25 @@
1.25 else
1.26 {
1.27 //old vector from one node to the breakpoint - c
1.28 - xy<double> c_v(old_arrow_pos.x-fix_node.x,old_arrow_pos.y-fix_node.y);
1.29 + XY c_v(old_arrow_pos.x-fix_node.x,old_arrow_pos.y-fix_node.y);
1.30
1.31 //unit vector with the same direction to a_v
1.32 - xy<double> a_v_u(a_v.x/absa,a_v.y/absa);
1.33 + XY a_v_u(a_v.x/absa,a_v.y/absa);
1.34
1.35 //normal vector of unit vector with the same direction to a_v
1.36 - xy<double> a_v_u_n(((-1)*a_v_u.y),a_v_u.x);
1.37 + XY a_v_u_n(((-1)*a_v_u.y),a_v_u.x);
1.38
1.39 //unit vector with the same direction to b_v
1.40 - xy<double> b_v_u(b_v.x/absb,b_v.y/absb);
1.41 + XY b_v_u(b_v.x/absb,b_v.y/absb);
1.42
1.43 //normal vector of unit vector with the same direction to b_v
1.44 - xy<double> b_v_u_n(((-1)*b_v_u.y),b_v_u.x);
1.45 + XY b_v_u_n(((-1)*b_v_u.y),b_v_u.x);
1.46
1.47 //vector c in a_v_u and a_v_u_n co-ordinate system
1.48 - xy<double> c_a(c_v*a_v_u,c_v*a_v_u_n);
1.49 + XY c_a(c_v*a_v_u,c_v*a_v_u_n);
1.50
1.51 //new vector from one node to the breakpoint - d - we have to calculate this one
1.52 - xy<double> d_v=absb/absa*(c_a.x*b_v_u+c_a.y*b_v_u_n);
1.53 + XY d_v=absb/absa*(c_a.x*b_v_u+c_a.y*b_v_u_n);
1.54
1.55 return XY(d_v.x+fix_node.x,d_v.y+fix_node.y);
1.56 }
1.57 @@ -305,7 +305,7 @@
1.58 window_to_world (e->button.x, e->button.y, clicked_x, clicked_y);
1.59
1.60 // update coordinates
1.61 - (mytab.mapstorage).coords.set(active_node, xy<double>(clicked_x, clicked_y));
1.62 + (mytab.mapstorage).coords.set(active_node, XY(clicked_x, clicked_y));
1.63
1.64 // update all other maps
1.65 for (std::map<std::string, Graph::NodeMap<double>*>::const_iterator it =
1.66 @@ -790,9 +790,9 @@
1.67 (mytab.mapstorage).graph.erase(edge_to_delete);
1.68 }
1.69
1.70 -void GraphDisplayerCanvas::textReposition(xy<double> new_place)
1.71 +void GraphDisplayerCanvas::textReposition(XY new_place)
1.72 {
1.73 - new_place+=(xy<double>(10,10));
1.74 + new_place+=(XY(10,10));
1.75 edgetextmap[forming_edge]->property_x().set_value(new_place.x);
1.76 edgetextmap[forming_edge]->property_y().set_value(new_place.y);
1.77 }