CColor CColor::operator * ( float k ) const { int R = static_cast<int> ( getRed() * k ); int G = static_cast<int> ( getGreen() * k ); int B = static_cast<int> ( getBlue() * k ); int A = static_cast<int> ( getAlpha() * k ); CColor newc; newc.setInt ( R , G , B , A ); return newc; }
CColor CColor::operator - ( const CColor& color ) const { int R = getRed() - color.getRed(); int G = getGreen() - color.getGreen(); int B = getBlue() - color.getBlue(); int A = getAlpha() - color.getAlpha(); CColor newc; newc.setInt ( R , G , B , A ); return newc; }