FormIt C++ API
v23.0.0 (2023.0.0)
|
The Color class stores an RGBA color value.
#include <Color.h>
Public Member Functions | |
Color ()=default | |
Constructor. More... | |
Color (int r, int g, int b, int a) | |
Accepts values in the range 0-255. More... | |
Color (uint8_t r, uint8_t g, uint8_t b, uint8_t a) | |
Accepts values in the range 0-255. More... | |
Color (double r, double g, double b, double a=1.0) | |
Accepts values in the range 0-1, defaults alpha to 1.0. More... | |
uint32_t | PackRGBA () const |
Pack color channels (RGBA) into a single uint32_t. More... | |
uint32_t | PackABGR () const |
Pack color channels (ABGR) into a single uint32_t. More... | |
bool | operator== (Color const &r) const |
bool | operator!= (Color const &r) const |
bool | operator< (WSM::Color const &r) const |
Public Attributes | |
Color Components | |
Individual color components are in the range 0 to 255. | |
uint8_t | m_red = 0 |
uint8_t | m_green = 0 |
uint8_t | m_blue = 0 |
uint8_t | m_alpha = 0 |
|
default |
Constructor.
|
inline |
Accepts values in the range 0-255.
|
inline |
Accepts values in the range 0-255.
|
inline |
Accepts values in the range 0-1, defaults alpha to 1.0.
|
inline |
|
inline |
|
inline |
|
inline |
Pack color channels (ABGR) into a single uint32_t.
|
inline |
Pack color channels (RGBA) into a single uint32_t.
uint8_t WSM::Color::m_alpha = 0 |
uint8_t WSM::Color::m_blue = 0 |
uint8_t WSM::Color::m_green = 0 |
uint8_t WSM::Color::m_red = 0 |