lemon/graph_to_eps.h
changeset 1944 89d5cf6e6abb
parent 1930 92b70deed0c5
child 1956 a055123339d5
equal deleted inserted replaced
17:10f1eb9da5ea 18:505a0a6d7a7f
   835 	bb.add(p+mycoords[n]);
   835 	bb.add(p+mycoords[n]);
   836 	bb.add(-p+mycoords[n]);
   836 	bb.add(-p+mycoords[n]);
   837 	break;
   837 	break;
   838       case MALE:
   838       case MALE:
   839 	bb.add(-p+mycoords[n]);
   839 	bb.add(-p+mycoords[n]);
   840 	bb.add(xy<double>(1.5*ns,1.5*sqrt(3)*ns)+mycoords[n]);
   840 	bb.add(xy<double>(1.5*ns,1.5*std::sqrt(3.0)*ns)+mycoords[n]);
   841 	break;
   841 	break;
   842       case FEMALE:
   842       case FEMALE:
   843 	bb.add(p+mycoords[n]);
   843 	bb.add(p+mycoords[n]);
   844 	bb.add(xy<double>(-ns,-3.01*ns)+mycoords[n]);
   844 	bb.add(xy<double>(-ns,-3.01*ns)+mycoords[n]);
   845 	break;
   845 	break;
  1062 	    int node_shape=_nodeShapes[g.target(e)];
  1062 	    int node_shape=_nodeShapes[g.target(e)];
  1063 	    double t1=0,t2=1;
  1063 	    double t1=0,t2=1;
  1064 	    for(int i=0;i<INTERPOL_PREC;++i)
  1064 	    for(int i=0;i<INTERPOL_PREC;++i)
  1065 	      if(isInsideNode((-(t1+t2)/2)*d,rn,node_shape)) t1=(t1+t2)/2;
  1065 	      if(isInsideNode((-(t1+t2)/2)*d,rn,node_shape)) t1=(t1+t2)/2;
  1066 	      else t2=(t1+t2)/2;
  1066 	      else t2=(t1+t2)/2;
  1067 	    double l=sqrt(d.normSquare());
  1067 	    double l=std::sqrt(d.normSquare());
  1068 	    d/=l;
  1068 	    d/=l;
  1069 	    
  1069 	    
  1070 	    os << l*(1-(t1+t2)/2) << ' '
  1070 	    os << l*(1-(t1+t2)/2) << ' '
  1071 	       << _edgeWidths[e]*_edgeWidthScale << ' '
  1071 	       << _edgeWidths[e]*_edgeWidthScale << ' '
  1072 	       << d.x << ' ' << d.y << ' '
  1072 	       << d.x << ' ' << d.y << ' '