#include <definitions.hpp>
|
| Uint8 | r |
| |
| Uint8 | g |
| |
| Uint8 | b |
| |
| Uint8 | a |
| |
|
| static const Color | WHITE = Color(255, 255, 255, 255) |
| |
| static const Color | BLACK = Color(0, 0, 0, 255) |
| |
| static const Color | RED = Color(255, 0, 0, 255) |
| |
| static const Color | GREEN = Color(0, 255, 0, 255) |
| |
| static const Color | BLUE = Color(0, 0, 255, 255) |
| |
| static const Color | TRANSPARENT = Color(0, 0, 0, 0) |
| |
A simple class that defines a color using red, green, blue and alpha channels.
Example usage:
Definition definitions.hpp:41
It also defines several pre-made static colors, like Color::WHITE, Color::BLACK, Color::TRANSPARENT, etc...
◆ Color() [1/6]
| Color::Color |
( |
int |
r, |
|
|
int |
g, |
|
|
int |
b |
|
) |
| |
◆ Color() [2/6]
| Color::Color |
( |
int |
r, |
|
|
int |
g, |
|
|
int |
b, |
|
|
int |
a |
|
) |
| |
◆ Color() [3/6]
| Color::Color |
( |
int |
hexCode | ) |
|
◆ Color() [4/6]
| Color::Color |
( |
int |
hexCode, |
|
|
int |
a |
|
) |
| |
◆ Color() [5/6]
| Color::Color |
( |
std::string |
hexCode | ) |
|
◆ Color() [6/6]
| Color::Color |
( |
const std::string & |
hexCode, |
|
|
int |
a |
|
) |
| |
◆ operator SDL_Color()
| Color::operator SDL_Color |
( |
| ) |
const |
|
inline |
◆ operator SDL_FColor()
| Color::operator SDL_FColor |
( |
| ) |
const |
|
inline |
◆ serialize()
template<class Archive >
| void Color::serialize |
( |
Archive & |
ar | ) |
|
|
inline |
◆ BLACK
◆ BLUE
◆ GREEN
◆ RED
◆ TRANSPARENT
| const Color Color::TRANSPARENT = Color(0, 0, 0, 0) |
|
static |
◆ WHITE
| const Color Color::WHITE = Color(255, 255, 255, 255) |
|
static |
The documentation for this class was generated from the following files: