struct Color8
{
u8 r;
u8 g;
u8 b;
u8 a;
};
Structure representing an integer number color.
| S |
ELEMENT_MIN
|
const int | The minimum value of the color component. |
|---|---|---|---|
| S |
ELEMENT_MAX
|
const int | The maximum value of the color component. |
| S |
ALPHA_MIN
|
const int | The minimum alpha value. |
| S |
ALPHA_MAX
|
const int | Maximum value of alpha. |
| S |
ALPHA_OPACITY
|
const int | The alpha value for transparency. |
| S |
ALPHA_TRANSPARENT
|
const int | The alpha value for transparency. |
| S | BLACK | const u32 | Constant for black. |
| S | GRAY | const u32 | Constant for gray. |
| S | WHITE | const u32 | Constant for white. |
| S | RED | const u32 | Constant for red. |
| S | GREEN | const u32 | Constant for green. |
| S | BLUE | const u32 | Constant for blue. |
| S | YELLOW | const u32 | Constant for yellow. |
| S | MAGENTA | const u32 | Constant for magenta. |
| S | CYAN | const u32 | Constant for cyan. |
| r | u8 | The R color component. Stores a value in ranging from 0 to 255. | |
|---|---|---|---|
| g | u8 | The G color component. Stores a value in ranging from 0 to 255. | |
| b | u8 | The B color component. Stores a value in ranging from 0 to 255. | |
| a | u8 | The A color component. Stores a value in ranging from 0 to 255. |
| Constructors and Destructors | ||
|---|---|---|
| Color8 | This is the default constructor. | |
| ~Color8 | Destructor. | |
| Overloaded Operators | ||
operator=
|
Assignment operator for assigning u32 types. | |
| operator u32 | Operator for casting to a u32-type. | |
| operator + | An addition operator for two colors. | |
| operator - | A subtraction operator for two colors. | |
| operator * | A multiplication operator for two colors. | |
| operator / | A division operator for two colors. | |
| operator ++ | Pre-position increment operator. | |
| operator -- | Pre-position decrement operator. | |
| operator | | Finds a bit sum as a u32 type. | |
| operator& | Finds a bit product as a u32 type. | |
| operator += | A compound assignment operator for adding two colors. | |
| operator -= | A compound assignment operator for subtracting two colors. | |
| operator *= | A compound assignment operator for multiplying two colors. | |
| operator /= | A compound assignment operator for dividing two colors. | |
| Set/Get | ||
Set
|
Sets an RGBA value. | |
| ToU32 | Gets a color value as a u32 type. | |
| SetU32 | Sets a value as a u32 type. | |
CONFIDENTIAL