COIN-OR::LEMON - Graph Library

Changeset 1202:da44ee225dad in lemon-0.x for src/lemon/graph_to_eps.h


Ignore:
Timestamp:
03/07/05 08:53:20 (15 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1614
Message:
  • rot90() and rot270() added to xy.h
  • graph_to_eps.h's own rot() func. replaced to this
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/graph_to_eps.h

    r1180 r1202  
    158158///\todo weighted average would be better
    159159inline Color distantBW(const Color &c){
    160   //  double v=(c.getR()+c.getG()+c.getB())<1.5?1:0;
    161160  double v=(.2125*c.getR()+.7154*c.getG()+.0721*c.getB())<.5?1:0;
    162161  return Color(v,v,v);
     
    327326    return (g.source(e)==g.source(f)&&g.target(e)==g.target(f))||
    328327      (g.source(e)==g.target(f)&&g.target(e)==g.source(f));
    329   }
    330   static xy<double> rot(xy<double> v)
    331   {
    332     return xy<double>(v.y,-v.x);
    333328  }
    334329  template<class TT>
     
    776771          for(typename std::vector<Edge>::iterator e=i;e!=j;++e) {
    777772            sw+=_edgeWidths[*e]*_edgeWidthScale/2.0;
    778             xy<double> mm=m+rot(d)*sw/.75;
     773            xy<double> mm=m+rot90(d)*sw/.75;
    779774            if(_drawArrows) {
    780775              int node_shape;
     
    812807                 << bez.p3.x << ' ' << bez.p3.y << ' '
    813808                 << bez.p4.x << ' ' << bez.p4.y << " curveto stroke\n";
    814               xy<double> dd(rot(linend-apoint));
     809              xy<double> dd(rot90(linend-apoint));
    815810              dd*=(.5*_edgeWidths[*e]*_edgeWidthScale+_arrowWidth)/
    816811                sqrt(dd.normSquare());
Note: See TracChangeset for help on using the changeset viewer.