[Lemon-commits] [lemon_svn] alpar: r1587 - hugo/trunk/src/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:46:26 CET 2006
Author: alpar
Date: Mon Feb 28 14:03:36 2005
New Revision: 1587
Modified:
hugo/trunk/src/lemon/graph_to_eps.h
Log:
Better color to bw conversion
Modified: hugo/trunk/src/lemon/graph_to_eps.h
==============================================================================
--- hugo/trunk/src/lemon/graph_to_eps.h (original)
+++ hugo/trunk/src/lemon/graph_to_eps.h Mon Feb 28 14:03:36 2005
@@ -157,8 +157,8 @@
///Returns black for light colors and white for the dark ones.
///\todo weighted average would be better
inline Color distantBW(const Color &c){
- double v=(c.getR()+c.getR()+c.getR())<1.5?1:0;
-
+ // double v=(c.getR()+c.getG()+c.getB())<1.5?1:0;
+ double v=(.2125*c.getR()+.7154*c.getG()+.0721*c.getB())<.5?1:0;
return Color(v,v,v);
}
More information about the Lemon-commits
mailing list