ColorC
Color class defines a four component color type. The components are red, green, blue and alpha. All components are handled similar inside the class.
This class is implemented by the system.
Header: | ColorC.h |
Library: | core.lib |
ColorC(
|
Copy constructor. Creates a new color with the same values as the argument.
ColorC(
|
Creates a new color with the values as the arguments.
void convert_from_uint8(
|
Converts color from unsigned integer values. All values are in range 0..255.
operator(const float32*();
|
Pointer to the color components.
Returns pointer to the color components of the color. This method is useful to pass an array of data to the for example rendering API.
ColorC rCol( 0.2, 0,3, 0.1, 0.7 );
glColor4fv( rCol );
float32& operator[](
|
const float32& operator[](
|
Reference to the color component pointed by the index.
The index values from 0 to 3 corresponds to components R, G, B, and A respectively. There are two versions of this method, the first enables to assign values and the second is for retrieving the values.
ColorC operator-() const;
|
Negated color.
bool operator==(
|
True if both colors are equal, else false.
bool operator!=(
|
True if colors are not equal, else false.
ColorC& operator-=(
|
Subtracts the color specified by the argument from the color.
ColorC& operator+=(
|
Adds the color specified by the argument to the color.
ColorC& operator*=(
|
Multiplies each color component by the specified number.
ColorC& operator/=(
|
Divides each color component by the specified number.
ColorC operator*(
|
Multiplies each color component by the specified number and returns the result.
ColorC operator/(
|
Divides each color component by the specified number and returns the result.
ColorC operator-(
|
Subtracts the color specified by the argument from the color and returns the result.
ColorC operator+(
|
Adds the color specified by the argument to the color and returns the result.
ColorC operator*(
|
Multiplies each component of the color by matching component in the specified argument and returns the result.
friend ColorC operator*(
|
Multiplies each color component by the specified number and returns the result.
Copyright © 2000 Moppi Productions