|
Porytiles
|
Represents a 32-bit RGBA color. More...
#include <rgba32.hpp>
Public Member Functions | |
| constexpr | Rgba32 () |
| constexpr | Rgba32 (std::uint8_t red, std::uint8_t green, std::uint8_t blue, std::uint8_t alpha=alpha_opaque) |
| auto | operator<=> (const Rgba32 &rgba) const =default |
| bool | operator== (const Rgba32 &rgba) const =default |
| bool | is_transparent (const Rgba32 &extrinsic) const |
| Checks if this color should be treated as transparent. | |
| std::string | to_jasc_str () const |
| bool | equals_ignoring_alpha (const Rgba32 &other) const |
| std::uint8_t | red () const |
| std::uint8_t | green () const |
| std::uint8_t | blue () const |
| std::uint8_t | alpha () const |
Static Public Attributes | |
| static constexpr std::uint8_t | alpha_transparent = 0 |
| static constexpr std::uint8_t | alpha_opaque = 255 |
Represents a 32-bit RGBA color.
RGBA32 stores color values as four 8-bit components: red, green, blue, and alpha. Alpha of 0 indicates full transparency, while alpha of 255 indicates full opacity.
Rgba32{} produces a transparent color with all components set to 0, including alpha. Definition at line 21 of file rgba32.hpp.
|
inlineconstexpr |
Definition at line 26 of file rgba32.hpp.
|
inlineconstexpr |
Definition at line 28 of file rgba32.hpp.
|
inline |
Definition at line 70 of file rgba32.hpp.
|
inline |
Definition at line 65 of file rgba32.hpp.
| bool porytiles2::Rgba32::equals_ignoring_alpha | ( | const Rgba32 & | other | ) | const |
Definition at line 23 of file rgba32.cpp.
|
inline |
Definition at line 60 of file rgba32.hpp.
| bool porytiles2::Rgba32::is_transparent | ( | const Rgba32 & | extrinsic | ) | const |
Checks if this color should be treated as transparent.
An RGBA32 color is considered transparent if either the color matches the extrinsic transparency color (ignoring alpha values) or if this color's intrinsic alpha value indicates transparency (alpha == 0).
| extrinsic | The extrinsic transparency color to check against |
Definition at line 9 of file rgba32.cpp.
|
default |
|
default |
|
inline |
Definition at line 55 of file rgba32.hpp.
| std::string porytiles2::Rgba32::to_jasc_str | ( | ) | const |
Definition at line 18 of file rgba32.cpp.
|
staticconstexpr |
Definition at line 24 of file rgba32.hpp.
|
staticconstexpr |
Definition at line 23 of file rgba32.hpp.