COIN-OR::LEMON - Graph Library

Changeset 1180:f772c360b466 in lemon-0.x


Ignore:
Timestamp:
02/28/05 14:03:36 (15 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1587
Message:

Better color to bw conversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/graph_to_eps.h

    r1178 r1180  
    158158///\todo weighted average would be better
    159159inline Color distantBW(const Color &c){
    160   double v=(c.getR()+c.getR()+c.getR())<1.5?1:0;
    161  
     160  //  double v=(c.getR()+c.getG()+c.getB())<1.5?1:0;
     161  double v=(.2125*c.getR()+.7154*c.getG()+.0721*c.getB())<.5?1:0;
    162162  return Color(v,v,v);
    163163}
Note: See TracChangeset for help on using the changeset viewer.