|
Maps SDK for C++ 1.0.0
|
RGBA color representation struct. More...

Classes | |
| struct | BitField32 |
| RGBA bit field. More... | |
Public Member Functions | |
| Rgba (unsigned int aValue=0) | |
| Constructor assigning rgba color as a single int, or 0 (black) if none specified. | |
| Rgba (unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha) | |
| Constructor assigning rgba color as 4 separate ints in the range 0-255 each. | |
| Rgba (const Rgba &clr, unsigned int alpha) | |
| Constructor assigning rgba color and an alpha value. | |
| bool | operator== (const Rgba &c) const |
| Equal operator. | |
| bool | operator!= (const Rgba &c) const |
| Not equal operator. | |
| unsigned int | argbValue () const |
| Converts this RGBA value to ARGB. | |
| unsigned int | bgraValue () const |
| Converts this RGBA value to BGRA. | |
| Rgba & | swapRedBlue () |
| Swaps red and blue colors. | |
| double | getLuma () const |
| Compute color luma in ITU-R BT.709 specs. | |
| bool | isLight () const |
| check if color is light | |
Static Public Member Functions | |
| static Rgba | noColor () |
| Static member function returning default rgba no-color 0,0,0,0 so, considering the max is 255, this would be completely black with alpha 0 (transparent). | |
| static Rgba | black () |
| Static member function returning rgba color of (0, 0, 0, 255). | |
| static Rgba | white () |
| Static member function returning rgba color of (255, 255, 255, 255). | |
Public Attributes | |
| union { | |
| BitField32 color | |
| Bitfield to access each individual r,g,b,a value as a byte. | |
| unsigned int value | |
| 4 byte int to store rgba value, 1 byte for each of r,g,b,a. | |
| }; | |
RGBA color representation struct.
|
inline |
Constructor assigning rgba color as a single int, or 0 (black) if none specified.
| aValue | RGBA color as a single int. |
|
inline |
Constructor assigning rgba color as 4 separate ints in the range 0-255 each.
| red | Red color value in range 0-255. |
| green | Green color value in range 0-255. |
| blue | Blue color value in range 0-255. |
| alpha | Alpha color value in range 0-255. |
|
inline |
Constructor assigning rgba color and an alpha value.
| clr | RGBA color. |
| alpha | Alpha color value in range 0-255. |
|
inline |
Converts this RGBA value to ARGB.
|
inline |
Converts this RGBA value to BGRA.
|
inlinestatic |
Static member function returning rgba color of (0, 0, 0, 255).
|
inline |
Compute color luma in ITU-R BT.709 specs.
|
inline |
check if color is light
|
inlinestatic |
Static member function returning default rgba no-color 0,0,0,0 so, considering the max is 255, this would be completely black with alpha 0 (transparent).
|
inline |
Not equal operator.
| c | RGBA color to compare to. |
|
inline |
Equal operator.
| c | RGBA color to compare to. |
|
inline |
Swaps red and blue colors.