Color::Modulate

Color::Modulate
static inline Color Modulate(Color c1, Color c2);
inline Color& Modulate(Color c);
Description

Modulate combines two colors by taking the clamped product of each channel (c1 * c2). For Color objects, the actual equation used for each 8 bit channel is: (((c1+1) * c2)>>8).

Parameters
Parameters 
Description 
Color c1 
The first (the destination) of two color parameters that is combined to form a new color (return value). * 
Color c2 
The second (the source) of two color parameters that is combined to form a new color (return value). * 
Color c 
A color (the source) multiplied with the current color (the destination). 
Return Value

The member function, taking one parameter (c), returns a Color reference to the current string, which was formed by multiplying the passed color from the original color (this * c). 

The static function, taking two parameters (c1 and c2), returns a new Color by value, which is formed from the product of the two passed colors (c1 * c2). * 

* - pertains to static function only. 

See Also