|
LPCGame
A Simple 2d Game Engine
|
A light wrapper around SDL_Color. More...
#include <color.h>
Public Member Functions | |
| Color () | |
| Construct the color with default (black) color. | |
| Color (int r, int g, int b) | |
| void | Set (int r, int g, int b) |
| SDL_Color | Get () const |
| Get the SDL_Color. | |
| int | R () const |
| Get the red value. | |
| void | R (int r) |
| Set the red value. | |
| int | G () const |
| Get the green value. | |
| void | G (int g) |
| Set the green value. | |
| int | B () const |
| Get the blue value. | |
| void | B (int b) |
| Set the blue value. | |
| Json::Value | Save () const |
| void | Load (Json::Value val) |
| bool | operator== (const Color &c) const |
| Operator for comparing colors. | |
| operator std::string () const | |
A light wrapper around SDL_Color.
A wrapper around the RGB SDL_Color to make it a bit nicer to use and make it easier to expose it to Lua via LuaBind
| Color::Color | ( | int | r, |
| int | g, | ||
| int | b | ||
| ) |
Construct the color with some desired color
| r | The red color value, 0-255 |
| g | The green color value, 0-255 |
| b | The blue color value, 0-255 |
| void Color::Load | ( | Json::Value | val | ) |
Load the color data from a Json::Value
| val | The Json::Value to load from |
| Json::Value Color::Save | ( | ) | const |
Save the color data to a Json::Value
| void Color::Set | ( | int | r, |
| int | g, | ||
| int | b | ||
| ) |
Set the color to some RGB value
| r | The red color value, 0-255 |
| g | The green color value, 0-255 |
| b | The blue color value, 0-255 |