Represents a color in RGBA format.
More...
#include <rgba.h>
|
union { |
struct { |
Ui8 a |
| Alpha component.
|
|
Ui8 b |
| Blue component.
|
|
Ui8 g |
| Green component.
|
|
Ui8 r |
| Red component.
|
|
} | |
|
Ui8 element [4] |
| Array access to color components.
|
|
Ui32 rgba |
| Combined RGBA value.
|
|
}; | |
|
Represents a color in RGBA format.
◆ Rgba() [1/3]
arctic::Rgba::Rgba |
( |
Ui8 |
r_in, |
|
|
Ui8 |
g_in, |
|
|
Ui8 |
b_in |
|
) |
| |
|
inlineexplicit |
Constructor for RGB color (alpha set to 255).
- Parameters
-
r_in | Red component |
g_in | Green component |
b_in | Blue component |
◆ Rgba() [2/3]
arctic::Rgba::Rgba |
( |
Ui8 |
r_in, |
|
|
Ui8 |
g_in, |
|
|
Ui8 |
b_in, |
|
|
Ui8 |
a_in |
|
) |
| |
|
inlineexplicit |
Constructor for RGBA color.
- Parameters
-
r_in | Red component |
g_in | Green component |
b_in | Blue component |
a_in | Alpha component (255 is opaque, 0 is transparent) |
◆ Rgba() [3/3]
arctic::Rgba::Rgba |
( |
Ui32 |
rgba_in | ) |
|
|
inlineexplicit |
Constructor from 32-bit RGBA value.
- Parameters
-
rgba_in | 32-bit value containing 0xAABBGGRR (e.g., 0xff00ff00 is opaque green) |
◆ operator!=()
const bool arctic::Rgba::operator!= |
( |
const Rgba & |
v | ) |
const |
|
inline |
Inequality comparison operator.
- Parameters
-
- Returns
- True if colors are not equal, false otherwise
◆ operator=()
Rgba & arctic::Rgba::operator= |
( |
const Rgba & |
v | ) |
|
|
inline |
Assignment operator.
- Parameters
-
- Returns
- Reference to this object
◆ operator==()
const bool arctic::Rgba::operator== |
( |
const Rgba & |
v | ) |
const |
|
inline |
Equality comparison operator.
- Parameters
-
- Returns
- True if colors are equal, false otherwise
◆ operator[]() [1/2]
Ui8 & arctic::Rgba::operator[] |
( |
Si32 |
i | ) |
|
|
inline |
Array subscript operator.
- Parameters
-
i | Index of the color component (0-3) |
- Returns
- Reference to the color component
◆ operator[]() [2/2]
const Ui8 & arctic::Rgba::operator[] |
( |
Si32 |
i | ) |
const |
|
inline |
Const array subscript operator.
- Parameters
-
i | Index of the color component (0-3) |
- Returns
- Const reference to the color component
The documentation for this struct was generated from the following file:
- /builds/seaice/arctic/engine/rgba.h