Represents an RGBA color.
More...
#include <Color.h>
List of all members.
Public Member Functions |
| Color (SDL_Color *c) |
| Color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha) |
SDL_Color * | operator* () const |
unsigned char | red () const |
Color & | red (unsigned char r) |
unsigned char | green () const |
Color & | green (unsigned char g) |
unsigned char | blue () const |
Color & | blue (unsigned char b) |
unsigned char | alpha () const |
Color & | alpha (unsigned char a) |
Detailed Description
Represents an RGBA color.
Definition at line 34 of file Color.h.
Constructor & Destructor Documentation
sdl::misc::Color::Color |
( |
SDL_Color * |
c | ) |
[inline] |
Constructs a Color from a SDL_Color structure.
- Parameters:
-
c | The SDL_Color structure. |
Definition at line 41 of file Color.h.
sdl::misc::Color::Color |
( |
unsigned char |
red, |
|
|
unsigned char |
green, |
|
|
unsigned char |
blue, |
|
|
unsigned char |
alpha |
|
) |
| [inline] |
Constructs a Color.
- Parameters:
-
red,The | red intensity. |
green,The | green intensity. |
blue,The | blue intensity. |
alpha,The | alpha intensity. |
Definition at line 51 of file Color.h.
Member Function Documentation
unsigned char sdl::misc::Color::alpha |
( |
| ) |
const [inline] |
Returns the alpha intensity.
- Returns:
- The alpha intensity.
Definition at line 136 of file Color.h.
Color& sdl::misc::Color::alpha |
( |
unsigned char |
a | ) |
[inline] |
Sets the alpha intensity.
- Returns:
- A reference to this Color.
Definition at line 145 of file Color.h.
unsigned char sdl::misc::Color::blue |
( |
| ) |
const [inline] |
Returns the blue intensity.
- Returns:
- The blue intensity.
Definition at line 115 of file Color.h.
Color& sdl::misc::Color::blue |
( |
unsigned char |
b | ) |
[inline] |
Sets the blue intensity.
- Parameters:
-
- Returns:
- A reference to this Color.
Definition at line 126 of file Color.h.
Color& sdl::misc::Color::green |
( |
unsigned char |
g | ) |
[inline] |
Sets the green intensity.
- Parameters:
-
- Returns:
- A reference to this Color.
Definition at line 105 of file Color.h.
unsigned char sdl::misc::Color::green |
( |
| ) |
const [inline] |
Returns the green intensity.
- Returns:
- The green intensity.
Definition at line 94 of file Color.h.
SDL_Color* sdl::misc::Color::operator* |
( |
| ) |
const [inline] |
Color& sdl::misc::Color::red |
( |
unsigned char |
r | ) |
[inline] |
Sets the red intensity.
- Parameters:
-
- Returns:
- A reference to this Color.
Definition at line 84 of file Color.h.
unsigned char sdl::misc::Color::red |
( |
| ) |
const [inline] |
Returns the red intensity.
- Returns:
- The red intensity.
Definition at line 73 of file Color.h.
The documentation for this class was generated from the following file: