Color Class Reference
#include <Color.h>
Description
A standard object representing an RGBA color.
Data Structures | |
class | Component |
Functions | |
Color (const std::string &name) | |
uint32_t | Int () const |
Color & | Define (int red, int green, int blue, int alpha) |
Color & | Define (uint32_t c) |
std::string | ToString () const |
Static Functions | |
static void | Define (const std::string &, const Color &) |
Properties | |
Component | r |
Component | g |
Component | b |
Component | a |
Constructor & Destructor Documentation
Color | ( | const std::string & | name | ) |
Sets the color to the color referred to by string.
- Parameters
-
name In the case that the string starts with a '#', the remainder of the string will be read as a hexidecimal integer referring to the values of the hex string. For example Color("#FF00FFFF") is equivalent to Color(255, 0, 255, 255) It is also valid to specify only 3 components: Color("#FF00FF") is equivalent to Color(255, 0, 255, 255). If the string does not begin with a '#', the string is impied to represent a string that has been mapped with Define().
Strings passed are not case-sensitive.
Member Function Documentation
uint32_t Int | ( | ) | const |
Returns an unsigned, 32-bit integer where each byte refers to a color component in RGBA form.
The first byte is the red component, then green, blue, and alpha.
Color& Define | ( | int | red, |
int | green, | ||
int | blue, | ||
int | alpha | ||
) |
Sets the color.
Color& Define | ( | uint32_t | c | ) |
Sets the color.
|
static |
Defines a new color to be recognized by name.
String names are not case-sensitive.
std::string ToString | ( | ) | const |
Returns the string form of the Color.
Field Documentation
The red amount.
The green amount.
The green amount.
The blue amount.
The documentation for this class was generated from the following file:
- /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Color.h