#include <ColorC.h>
Public Methods | |
ColorC (const ColorC &rCol) | |
Copy constructor. | |
ColorC (float32 f32R=0, float32 f32G=0, float32 f32B=0, float32 f32A=1.0f) | |
Default constructor. | |
~ColorC () | |
Default destructor. | |
void | convert_from_uint8 (uint8 ui8R, uint8 ui8G, uint8 ui8B, uint8 ui8A=255) |
Converts color from unsigned integer values. | |
operator const float32 * () | |
Constant float pointer cast operator. | |
float32 & | operator[] (int32 i) |
Returns component of the color. | |
const float32 & | operator[] (int32 i) const |
Returns component of the color. | |
ColorC | operator- () const |
Returns negated color. | |
bool | operator== (const ColorC &rCol) const |
Returns true if both colors are equal, else false. | |
bool | operator!= (const ColorC &rCol) const |
Returns true if colors are not equal, else false. | |
ColorC & | operator-= (const ColorC &rCol) |
Subtracts the color specified by the argument from the color. | |
ColorC & | operator+= (const ColorC &rCol) |
Adds the color specified by the argument to the color. | |
ColorC & | operator *= (float32 f32S) |
Multiplies each color component by the specified number. | |
ColorC & | operator/= (float32 f32S) |
Divides each color component by the specified number. | |
ColorC | operator * (float32 f32S) const |
Multiplies each color component by the specified number and returns the result. | |
ColorC | operator/ (float32 f32S) const |
Divides each color component by the specified number and returns the result. | |
ColorC | operator- (const ColorC &rCol) const |
Subtracts the color specified by the argument from the color and returns the result. | |
ColorC | operator+ (const ColorC &rCol) const |
Adds the color specified by the argument to the color and returns the result. | |
ColorC | operator * (const ColorC &rCol) const |
Multiplies each component of the color by matching component in the specified argument and returns the result. | |
Friends | |
ColorC | operator * (float32 f32S, const ColorC &rCol) |
Multiplies each color component by the specified number and returns the result. |
Color class defines a four component color type. The components are red, green, blue and alpha. All components are handled similar inside the class.
The assumed color range is 0..1.
This class is implemented by the system.
|
Copy constructor.
|
|
Default constructor.
|
|
Default destructor.
|
|
Converts color from unsigned integer values. All values are in range 0..255. |
|
Multiplies each component of the color by matching component in the specified argument and returns the result.
|
|
Multiplies each color component by the specified number and returns the result.
|
|
Multiplies each color component by the specified number.
|
|
Constant float pointer cast operator.
|
|
Returns true if colors are not equal, else false.
|
|
Adds the color specified by the argument to the color and returns the result.
|
|
Adds the color specified by the argument to the color.
|
|
Subtracts the color specified by the argument from the color and returns the result.
|
|
Returns negated color.
|
|
Subtracts the color specified by the argument from the color.
|
|
Divides each color component by the specified number and returns the result.
|
|
Divides each color component by the specified number.
|
|
Returns true if both colors are equal, else false.
|
|
Returns component of the color. The index values from 0 to 3 corresponds to components R, G, B, and A respectively. There are two versions of this method, this version is for retrieving the values. |
|
Returns component of the color. The index values from 0 to 3 corresponds to components R, G, B, and A respectively. There are two versions of this method, this version enables to assign values. |
|
Multiplies each color component by the specified number and returns the result.
|