|
roo_display
API Documentation for roo_display
|
ARGB8888 color stored as a 32-bit unsigned integer. More...
#include <color.h>
Public Member Functions | |
| Color () | |
| Construct transparent black. | |
| constexpr | Color (uint8_t r, uint8_t g, uint8_t b) |
| Construct opaque color from RGB. | |
| constexpr | Color (uint8_t a, uint8_t r, uint8_t g, uint8_t b) |
| Construct ARGB color from components. | |
| constexpr | Color (uint32_t argb) |
| Construct from a packed ARGB value. | |
| constexpr uint32_t | asArgb () const |
| Return packed ARGB value. | |
| constexpr uint8_t | a () const |
| Alpha channel. | |
| constexpr uint8_t | r () const |
| Red channel. | |
| constexpr uint8_t | g () const |
| Green channel. | |
| constexpr uint8_t | b () const |
| Blue channel. | |
| void | set_a (uint8_t a) |
| Set alpha channel. | |
| void | set_r (uint8_t r) |
| Set red channel. | |
| void | set_g (uint8_t g) |
| Set green channel. | |
| void | set_b (uint8_t g) |
| Set blue channel. | |
| constexpr Color | withA (uint8_t a) const |
| Return a copy with the specified alpha channel. | |
| constexpr Color | withR (uint8_t r) const |
| Return a copy with the specified red channel. | |
| constexpr Color | withG (uint8_t g) const |
| Return a copy with the specified green channel. | |
| constexpr Color | withB (uint8_t b) const |
| Return a copy with the specified blue channel. | |
| constexpr bool | isOpaque () const |
| Return true if the color is fully opaque (alpha = 255). | |
| constexpr Color | toOpaque () |
| Return a fully opaque copy (alpha = 255). | |
ARGB8888 color stored as a 32-bit unsigned integer.
This is a lightweight, trivially-constructible type that can be passed by value, with convenience accessors and type safety.
|
inline |
Alpha channel.
Definition at line 36 of file color.h.
Referenced by isOpaque(), roo_display::BlendOp< BlendingMode::kSourceOverOpaque >::operator()(), roo_display::BlendOp< BlendingMode::kSourceOver >::operator()(), roo_display::BlendOp< BlendingMode::kSourceAtop >::operator()(), roo_display::BlendOp< BlendingMode::kSourceIn >::operator()(), roo_display::BlendOp< BlendingMode::kSourceOut >::operator()(), roo_display::BlendOp< BlendingMode::kXor >::operator()(), roo_display::RawFullByteBlender< Alpha8, BlendingMode::kSourceOver, byte_order >::operator()(), roo_display::RawFullByteBlender< Grayscale8, BlendingMode::kSourceOver, byte_order >::operator()(), roo_display::RawFullByteBlender< Grayscale8, BlendingMode::kSourceOverOpaque, byte_order >::operator()(), roo_display::RoundRectShadow::RoundRectShadow(), set_a(), roo_display::RawStreamableFilledRect::RawStream::transparency(), and withA().
Return packed ARGB value.
Definition at line 33 of file color.h.
Referenced by roo_display::operator!=(), roo_display::operator==(), roo_display::Alpha8::toArgbColor(), roo_display::Alpha4::toArgbColor(), and toOpaque().
Blue channel.
Definition at line 42 of file color.h.
Referenced by roo_display::BlendOp< BlendingMode::kSourceOverOpaque >::operator()(), roo_display::BlendOp< BlendingMode::kSourceOver >::operator()(), roo_display::BlendOp< BlendingMode::kSourceAtop >::operator()(), roo_display::BlendOp< BlendingMode::kXor >::operator()(), and withB().
Green channel.
Definition at line 40 of file color.h.
Referenced by roo_display::BlendOp< BlendingMode::kSourceOverOpaque >::operator()(), roo_display::BlendOp< BlendingMode::kSourceOver >::operator()(), roo_display::BlendOp< BlendingMode::kSourceAtop >::operator()(), roo_display::BlendOp< BlendingMode::kXor >::operator()(), set_b(), set_g(), and withG().
Return true if the color is fully opaque (alpha = 255).
Definition at line 89 of file color.h.
References a().
Referenced by roo_display::FilledRect::getTransparencyMode(), and roo_display::RawStreamableFilledRect::RawStream::transparency().
Red channel.
Definition at line 38 of file color.h.
Referenced by roo_display::BlendOp< BlendingMode::kSourceOverOpaque >::operator()(), roo_display::BlendOp< BlendingMode::kSourceOver >::operator()(), roo_display::BlendOp< BlendingMode::kSourceAtop >::operator()(), roo_display::BlendOp< BlendingMode::kXor >::operator()(), set_r(), and withR().
Set alpha channel.
Definition at line 45 of file color.h.
References a().
Referenced by roo_display::internal::RleStreamRgb565Alpha4< Resource >::next().
Return a copy with the specified alpha channel.
Definition at line 69 of file color.h.
Referenced by roo_display::BlendOp< BlendingMode::kSourceAtop >::operator()(), roo_display::BlendOp< BlendingMode::kSourceIn >::operator()(), roo_display::BlendOp< BlendingMode::kSourceOut >::operator()(), roo_display::BlendOp< BlendingMode::kXor >::operator()(), roo_display::RoundRectShadow::readColorRect(), and roo_display::RoundRectShadow::readColors().