colortype
touchgfx/hal/Types.hpp
This type can contain a color value. Note that in order to maintain backwards compatibility, casting this type to an integral value will yield a 16-bit value. To extract a 24/32-bit color from this type, use the getColor32 function.
Public Functions
colortype() | |
Default constructor. | |
colortype(uint32_t col) | |
Constructor which creates a colortype with the given color. | |
FORCE_INLINE_FUNCTION uint32_t | getColor32() const |
Gets color as a 32bit value suitable for passing to Color::getRed(), Color::getGreen() and Color::getBlue() which will handle all bitdeptchs. | |
operator uint32_t() const | |
Cast that converts the given colortype to an uint32_t. | |
Public Attributes
uint32_t | color |
The color. | |
Public Functions Documentation
colortype
Default constructor.
Creates a black (0) color.
colortype
colortype | ( | uint32_t | col | ) | |
Constructor which creates a colortype with the given color.
Use Color::getColorFromRGB() to create a color that will work on your selected LCD type.
Parameters:
col | The color. |
See also:
getColor32
FORCE_INLINE_FUNCTION uint32_t getColor32 | ( | ) | const |
Gets color as a 32bit value suitable for passing to Color::getRed(), Color::getGreen() and Color::getBlue() which will handle all bitdeptchs.
Returns:
The color 32.
See also:
operator uint32_t
operator uint32_t | ( | ) | const |
Cast that converts the given colortype to an uint32_t.
Returns:
The result of the operation.
Public Attributes Documentation
color
uint32_t color
The color.