equal
deleted
inserted
replaced
155 ///Returns black for light colors and white for the dark ones. |
155 ///Returns black for light colors and white for the dark ones. |
156 |
156 |
157 ///Returns black for light colors and white for the dark ones. |
157 ///Returns black for light colors and white for the dark ones. |
158 ///\todo weighted average would be better |
158 ///\todo weighted average would be better |
159 inline Color distantBW(const Color &c){ |
159 inline Color distantBW(const Color &c){ |
160 double v=(c.getR()+c.getR()+c.getR())<1.5?1:0; |
160 // double v=(c.getR()+c.getG()+c.getB())<1.5?1:0; |
161 |
161 double v=(.2125*c.getR()+.7154*c.getG()+.0721*c.getB())<.5?1:0; |
162 return Color(v,v,v); |
162 return Color(v,v,v); |
163 } |
163 } |
164 |
164 |
165 ///Default traits class of \ref GraphToEps |
165 ///Default traits class of \ref GraphToEps |
166 |
166 |