Color class that is used to store RGBA8 color information.
More...
#include <Graphics.hpp>
Color class that is used to store RGBA8 color information.
◆ Color() [1/2]
Aspen::Graphics::Color::Color |
( |
unsigned |
color = 0xFFFFFFFF | ) |
|
Constructor.
- Parameters
-
color | RGBA8 color to use as data Defaults to fully white |
◆ Color() [2/2]
Aspen::Graphics::Color::Color |
( |
unsigned char |
r, |
|
|
unsigned char |
g, |
|
|
unsigned char |
b, |
|
|
unsigned char |
a = 0xFF |
|
) |
| |
Constructor.
- Parameters
-
r | Red component |
g | Green component |
b | Blue component |
a | Alpha component Defaults to fully opaque |
◆ Alpha() [1/2]
Uint8 Aspen::Graphics::Color::Alpha |
( |
| ) |
const |
Gets alpha of the color.
- Returns
- Alpha component of the color
◆ Alpha() [2/2]
void Aspen::Graphics::Color::Alpha |
( |
Uint8 |
a | ) |
|
Sets alpha of the color.
- Parameters
-
a | Alpha component of the color |
◆ Blue() [1/2]
Uint8 Aspen::Graphics::Color::Blue |
( |
| ) |
const |
Gets blue of the color.
- Returns
- Blue component of the color
◆ Blue() [2/2]
void Aspen::Graphics::Color::Blue |
( |
Uint8 |
b | ) |
|
Sets blue of the color.
- Parameters
-
b | Blue component of the color |
◆ Green() [1/2]
Uint8 Aspen::Graphics::Color::Green |
( |
| ) |
const |
Gets green of the color.
- Returns
- Green component of the color
◆ Green() [2/2]
void Aspen::Graphics::Color::Green |
( |
Uint8 |
g | ) |
|
Sets green of the color.
- Parameters
-
g | Green component of the color |
◆ operator==()
bool Aspen::Graphics::Color::operator== |
( |
const Color & |
rhs | ) |
const |
Equality operator.
- Parameters
-
rhs | Color to the right of the operator |
- Returns
- True if both colors are equivalent False otherwise
◆ Red() [1/2]
Uint8 Aspen::Graphics::Color::Red |
( |
| ) |
const |
Gets red of the color.
- Returns
- Red component of the color
◆ Red() [2/2]
void Aspen::Graphics::Color::Red |
( |
Uint8 |
r | ) |
|
Sets red of the color.
- Parameters
-
r | Red component of the color |
The documentation for this class was generated from the following file: