# HG changeset patch # User hegyi # Date 1122570373 0 # Node ID c0d7a92479634ac2ff6741069e1e0b2d9891f612 # Parent 70d169a8313ae6d73b89b8f0528dd3d0f3cb8b27 Tooltip should be turn up on CreateNode tool. diff -r 70d169a8313a -r c0d7a9247963 gui/broken_edge.cc --- a/gui/broken_edge.cc Thu Jul 28 17:01:40 2005 +0000 +++ b/gui/broken_edge.cc Thu Jul 28 17:06:13 2005 +0000 @@ -45,17 +45,18 @@ { //arrow keeps its position-left button - // if(p.size()==2) - // { - // Gnome::Canvas::Points points; - // my_points[0]=p[0]; - // my_points[2]=p[1]; - // for(int i=0;i<3;i++) - // { - // points.push_back(my_points[i]); - // } - // property_points().set_value(points); - // } + if(p.size()==2) + { + Gnome::Canvas::Points points; + my_points[0]=p[0]; + my_points[2]=p[1]; + for(int i=0;i<3;i++) + { + points.push_back(my_points[i]); + } + property_points().set_value(points); + } + set_arrow=true; ////////////////////////////////////////////////////////////////////////////////////////////////////// /////////// kepps shape-with angles @@ -184,54 +185,54 @@ /////////// kepps shape-with scalar multiplication ////////////////////////////////////////////////////////////////////////////////////////////////////// - if(p.size()==2) - { - //old vector from one to the other node - a - xy a_v(my_points[2].get_x()-my_points[0].get_x(),my_points[2].get_y()-my_points[0].get_y()); - //new vector from one to the other node - b - xy b_v(p[1].get_x()-p[0].get_x(),p[1].get_y()-p[0].get_y()); +// if(p.size()==2) +// { +// //old vector from one to the other node - a +// xy a_v(my_points[2].get_x()-my_points[0].get_x(),my_points[2].get_y()-my_points[0].get_y()); +// //new vector from one to the other node - b +// xy b_v(p[1].get_x()-p[0].get_x(),p[1].get_y()-p[0].get_y()); - //old vector from one node to the breakpoint - c - xy c_v(my_points[1].get_x()-my_points[0].get_x(),my_points[1].get_y()-my_points[0].get_y()); +// //old vector from one node to the breakpoint - c +// xy c_v(my_points[1].get_x()-my_points[0].get_x(),my_points[1].get_y()-my_points[0].get_y()); - //new vector from one node to the breakpoint - d - we have to calculate this one - xy d_v; +// //new vector from one node to the breakpoint - d - we have to calculate this one +// xy d_v; - //scalar product of a and b (old and new vector from first point to the other) - double sab=a_v*b_v; - //scalar product of c and d (old and new vector from first point to breakpoint) - double scd=sab*c_v.normSquare()/a_v.normSquare(); +// //scalar product of a and b (old and new vector from first point to the other) +// double sab=a_v*b_v; +// //scalar product of c and d (old and new vector from first point to breakpoint) +// double scd=sab*c_v.normSquare()/a_v.normSquare(); - std::cout<<" a " << a_v<<" b " <