Changeset 1087:d496d1d5a5e7 in lemon-0.x for src
- Timestamp:
- 01/18/05 13:23:09 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1483
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/graph_to_eps.h
r1086 r1087 153 153 typedef typename Graph::InEdgeIt InEdgeIt; 154 154 typedef typename Graph::OutEdgeIt OutEdgeIt; 155 156 static const int INTERPOL_PREC=20; 155 157 156 158 bool dontPrint; … … 518 520 if(_drawArrows) { 519 521 int node_shape; 520 const int INERPOL_PREC=20;521 522 xy<double> s=_coords[g.source(*e)]; 522 523 xy<double> t=_coords[g.target(*e)]; … … 525 526 Bezier3 bez(s,mm,mm,t); 526 527 double t1=0,t2=1; 527 for(int i=0;i<IN ERPOL_PREC;++i)528 for(int i=0;i<INTERPOL_PREC;++i) 528 529 if(isInsideNode(bez((t1+t2)/2)-t,rn,node_shape)) t2=(t1+t2)/2; 529 530 else t1=(t1+t2)/2; … … 532 533 rn*=rn; 533 534 t2=(t1+t2)/2;t1=0; 534 for(int i=0;i<IN ERPOL_PREC;++i)535 for(int i=0;i<INTERPOL_PREC;++i) 535 536 if((bez((t1+t2)/2)-apoint).normSquare()>rn) t1=(t1+t2)/2; 536 537 else t2=(t1+t2)/2; … … 540 541 // node_shape=_nodeShapes[g.source(*e)]; 541 542 // t1=0;t2=1; 542 // for(int i=0;i<IN ERPOL_PREC;++i)543 // for(int i=0;i<INTERPOL_PREC;++i) 543 544 // if(isInsideNode(bez((t1+t2)/2)-t,rn,node_shape)) t1=(t1+t2)/2; 544 545 // else t2=(t1+t2)/2; … … 578 579 if(_drawArrows) { 579 580 xy<double> d(_coords[g.target(e)]-_coords[g.source(e)]); 581 double rn=_nodeSizes[g.target(e)]*_nodeScale; 582 int node_shape=_nodeShapes[g.target(e)]; 583 double t1=0,t2=1; 584 for(int i=0;i<INTERPOL_PREC;++i) 585 if(isInsideNode((-(t1+t2)/2)*d,rn,node_shape)) t1=(t1+t2)/2; 586 else t2=(t1+t2)/2; 580 587 double l=sqrt(d.normSquare()); 581 588 d/=l; 582 xy<double> x1(d*_nodeScale*_nodeSizes[g.source(e)]+ 583 _coords[g.source(e)]); 584 os << l-(_nodeSizes[g.source(e)]+ 585 _nodeSizes[g.target(e)])*_nodeScale << ' ' 589 590 os << l*(1-(t1+t2)/2) << ' ' 586 591 << _edgeWidths[e]*_edgeWidthScale << ' ' 587 592 << d.x << ' ' << d.y << ' ' 588 << x1.x << ' ' << x1.y << ' ' 593 << _coords[g.source(e)].x << ' ' 594 << _coords[g.source(e)].y << ' ' 589 595 << _edgeColors[e].getR() << ' ' 590 596 << _edgeColors[e].getG() << ' '
Note: See TracChangeset
for help on using the changeset viewer.