struct Color8
{
u8 r;
u8 g;
u8 b;
u8 a;
};
Structure representing an integer number color.
| S | ELEMENT_MIN | Minimum value of color elements. |
|---|---|---|
| S | ELEMENT_MAX | Maximum value of color elements. |
| S | ALPHA_MIN | Minimum value of alpha. |
| S | ALPHA_MAX | Maximum value of alpha. |
| S | ALPHA_OPACITY | Alpha value for opacity. |
| S | ALPHA_TRANSPARENT | Alpha value for transparency. |
| S | BLACK | Constant for black. |
| S | GRAY | Constant for gray. |
| S | WHITE | Constant for white. |
| S | RED | Constant for red. |
| S | GREEN | Constant for green. |
| S | BLUE | Constant for blue. |
| S | YELLOW | Constant for yellow. |
| S | MAGENTA | Constant for magenta. |
| S | CYAN | Constant for cyan. |
| r | R component of a color. Stores a value in ranging from 0 to 255. | |
|---|---|---|
| g | G component of a color. Stores a value in ranging from 0 to 255. | |
| b | B component of a color. Stores a value in ranging from 0 to 255. | |
| a | A component of a color. Stores a value in ranging from 0 to 255. |
| Constructors and Destructors | ||
|---|---|---|
| Color8 | This is the default constructor. | |
| ~Color8 | Destructor. | |
| Operator Overload | ||
operator=
|
Assignment operator for assigning u32 types. | |
| operator u32 | Operator for casting to a u32-type. | |
| operator + | Addition operator for same colors. | |
| operator - | Subtraction operator for same colors. | |
| operator * | Multiplication operator for same colors. | |
| operator / | Division operator for same 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 += | Addition assignment operator for same colors. | |
| operator -= | Subtraction assignment operator for same colors. | |
| operator *= | Multiplication assignment operator for same colors. | |
| operator /= | Division assignment operator for same 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