|
|
| Color (double r=0.0, double g=0.0, double b=0.0, double a=1.0) |
| | Constructor from separated components.
|
| |
|
const double & | operator[] (size_t i) const |
| | access component i
|
| |
|
double & | operator[] (size_t i) |
| | access component i
|
| |
|
void | operator+= (double d) |
| | Add d to each component.
|
| |
|
Color | operator+ (double d) const |
| | Add d to each component and return result in a new color. I'm left unchanged.
|
| |
|
void | operator-= (double d) |
| | Substract d from each component.
|
| |
|
Color | operator- (double d) const |
| | Substract d from each component and return result in a new color. I'm left unchanged.
|
| |
|
void | operator*= (double d) |
| | Multiply each component with d.
|
| |
|
Color | operator* (double d) const |
| | Multiply each component with d and return result in a new color. I'm left unchanged.
|
| |
|
void | operator/= (double d) |
| | Divide each component with d.
|
| |
|
Color | operator/ (double d) const |
| | Divide each component with d and return result in a new color. I'm left unchanged.
|
| |
|
void | operator+= (const Color &oc) |
| | Add oc's components to ours.
|
| |
|
Color | operator+ (const Color &oc) const |
| | Add oc's components to ours and return result in a new color. I'm left unchanged.
|
| |
|
void | operator-= (const Color &oc) |
| | Substract oc's components to ours.
|
| |
|
Color | operator- (const Color &oc) const |
| | Substract oc's components to ours and return result in a new color. I'm left unchanged.
|
| |
|
bool | operator== (const Color &c) const |
| | Compare all components and return true if they're the same.
|
| |
|
bool | operator!= (const Color &c) const |
| | Compare all components and return false if they're the same.
|
| |
|
void | threshold (const Color &limit) |
| | Threshold the color using limit. For each component, if value is below limit, set it to 0.
|
| |
|
double | toGray () const |
| | Return the grey level value.
|
| |
|
std::string | toString () const |
| | Return a string describing this color.
|
| |
|
double | r () const |
| | Red component value getter.
|
| |
|
void | setR (double value) |
| | Set the value of red component.
|
| |
|
double | g () const |
| | Green component value getter.
|
| |
|
void | setG (double value) |
| | Set the value of green component.
|
| |
|
double | b () const |
| | Blue component value getter.
|
| |
|
void | setB (double value) |
| | Set the value of blue component.
|
| |
|
double | a () const |
| | Alpha component value getter.
|
| |
|
void | setA (double value) |
| | Set the value of alpha component.
|
| |