#include <common.h>
Public Member Functions | |
Color (char r=255, char g=255, char b=255, char a=255) | |
Constructor. | |
SDL_Color | toSDLColor () const |
Convert this color to an SDL_Color struct. | |
char | r () const |
Get a color component from this object. | |
char | g () const |
Get a color component from this object. | |
char | b () const |
Get a color component from this object. | |
char | a () const |
Get a color component from this object. | |
Private Attributes | |
char | m_R |
char | m_G |
char | m_B |
char | m_A |
Each color can have four color attributes, including the optional alpha value. However, only the first three are actually used by the engine at this time, though that may change in the future
Color::Color | ( | char | r = 255 , |
|
char | g = 255 , |
|||
char | b = 255 , |
|||
char | a = 255 | |||
) | [inline] |
Constructor.
r | The red component | |
g | The green component | |
b | The blue component | |
a | The alpha component |
SDL_Color Color::toSDLColor | ( | ) | const [inline] |
Convert this color to an SDL_Color struct.