lemon/graph_to_eps.h
changeset 218 0d6511647639
parent 210 81cfc04531e8
child 220 a5d8c039f218
equal deleted inserted replaced
11:22bf44b6e706 12:bf3641551f63
   906           dim2::Point<double>
   906           dim2::Point<double>
   907             dvec(mycoords[g.target(*i)]-mycoords[g.source(*i)]);
   907             dvec(mycoords[g.target(*i)]-mycoords[g.source(*i)]);
   908           double l=std::sqrt(dvec.normSquare());
   908           double l=std::sqrt(dvec.normSquare());
   909           //\todo better 'epsilon' would be nice here.
   909           //\todo better 'epsilon' would be nice here.
   910           dim2::Point<double> d(dvec/std::max(l,EPSILON));
   910           dim2::Point<double> d(dvec/std::max(l,EPSILON));
   911            dim2::Point<double> m;
   911           dim2::Point<double> m;
   912 //           m=dim2::Point<double>(mycoords[g.target(*i)]+
   912 //           m=dim2::Point<double>(mycoords[g.target(*i)]+
   913 //                                 mycoords[g.source(*i)])/2.0;
   913 //                                 mycoords[g.source(*i)])/2.0;
   914 
   914 
   915 //            m=dim2::Point<double>(mycoords[g.source(*i)])+
   915 //            m=dim2::Point<double>(mycoords[g.source(*i)])+
   916 //             dvec*(double(_nodeSizes[g.source(*i)])/
   916 //             dvec*(double(_nodeSizes[g.source(*i)])/
   917 //                (_nodeSizes[g.source(*i)]+_nodeSizes[g.target(*i)]));
   917 //                (_nodeSizes[g.source(*i)]+_nodeSizes[g.target(*i)]));
   918 
   918 
   919            m=dim2::Point<double>(mycoords[g.source(*i)])+
   919           m=dim2::Point<double>(mycoords[g.source(*i)])+
   920             d*(l+_nodeSizes[g.source(*i)]-_nodeSizes[g.target(*i)])/2.0;
   920             d*(l+_nodeSizes[g.source(*i)]-_nodeSizes[g.target(*i)])/2.0;
   921 
   921 
   922           for(typename std::vector<Arc>::iterator e=i;e!=j;++e) {
   922           for(typename std::vector<Arc>::iterator e=i;e!=j;++e) {
   923             sw+=_arcWidths[*e]*_arcWidthScale/2.0;
   923             sw+=_arcWidths[*e]*_arcWidthScale/2.0;
   924             dim2::Point<double> mm=m+rot90(d)*sw/.75;
   924             dim2::Point<double> mm=m+rot90(d)*sw/.75;