WKAL::Color Class Reference
List of all members.
|
Public Member Functions |
| | Color () |
| | Color default constructor.
|
| | Color (RGBA32 col) |
| | Color constructor.
|
| | Color (int r, int g, int b) |
| | Color constructor.
|
| | Color (int r, int g, int b, int a) |
| | Color constructor.
|
| | Color (const String &) |
| | Color constructor.
|
| | Color (const char *) |
| | Color constructor.
|
| String | name () const |
| | get name
|
| void | setNamedColor (const String &) |
| | set named color
|
| bool | isValid () const |
| | test if the color is valid
|
| bool | hasAlpha () const |
| | test if color has alpha
|
| int | red () const |
| | get red value
|
| int | green () const |
| | get green value
|
| int | blue () const |
| | get blue value
|
| int | alpha () const |
| | get alpha value
|
| RGBA32 | rgb () const |
| | get rgba quadruplet
|
| void | setRGB (int r, int g, int b) |
| | setRGB
|
| void | setRGB (RGBA32 rgb) |
| | setRGB
|
| void | getRGBA (float &r, float &g, float &b, float &a) const |
| | getRGBA
|
| void | getRGBA (double &r, double &g, double &b, double &a) const |
| | getRGBA
|
| Color | light () const |
| | increase the light
|
| Color | dark () const |
| | increase the dark
|
| Color | blend (const Color &) const |
| | blend
|
| Color | blendWithWhite () const |
| | blendWithWhite
|
| | Color (const BalColor &) |
| | Color platform constructor.
|
Static Public Member Functions |
| static bool | parseHexColor (const String &name, RGBA32 &rgb) |
| | parseHexColor
|
Static Public Attributes |
| static const RGBA32 | black = 0xFF000000 |
| static const RGBA32 | white = 0xFFFFFFFF |
| static const RGBA32 | darkGray = 0xFF808080 |
| static const RGBA32 | gray = 0xFFA0A0A0 |
| static const RGBA32 | lightGray = 0xFFC0C0C0 |
| static const RGBA32 | transparent = 0x00000000 |
Constructor & Destructor Documentation
Color default constructor.
| WKAL::Color::Color |
( |
RGBA32 |
col |
) |
|
Color constructor.
- Parameters:
-
| WKAL::Color::Color |
( |
int |
r, |
|
|
int |
g, |
|
|
int |
b | |
|
) |
| | |
Color constructor.
- Parameters:
-
| [in] | : | red value |
| [in] | : | green value |
| [in] | : | blue value |
| WKAL::Color::Color |
( |
int |
r, |
|
|
int |
g, |
|
|
int |
b, |
|
|
int |
a | |
|
) |
| | |
Color constructor.
- Parameters:
-
| [in] | : | red value |
| [in] | : | green value |
| [in] | : | blue value |
| [in] | : | alpha value |
| WKAL::Color::Color |
( |
const String & |
|
) |
[explicit] |
Color constructor.
- Parameters:
-
| WKAL::Color::Color |
( |
const char * |
|
) |
[explicit] |
Color constructor.
- Parameters:
-
| WKAL::Color::Color |
( |
const BalColor & |
|
) |
|
Color platform constructor.
Member Function Documentation
| String WKAL::Color::name |
( |
|
) |
const |
| void WKAL::Color::setNamedColor |
( |
const String & |
|
) |
|
set named color
- Parameters:
-
| bool WKAL::Color::isValid |
( |
|
) |
const |
test if the color is valid
- Parameters:
-
| [out] | : | true if the color is valid |
| bool WKAL::Color::hasAlpha |
( |
|
) |
const |
test if color has alpha
- Parameters:
-
| [out] | : | true if color has alpha bool alpha = c->hasAlpha();
|
| int WKAL::Color::red |
( |
|
) |
const |
get red value
- Parameters:
-
| int WKAL::Color::green |
( |
|
) |
const |
get green value
- Parameters:
-
| int WKAL::Color::blue |
( |
|
) |
const |
get blue value
- Parameters:
-
| int WKAL::Color::alpha |
( |
|
) |
const |
get alpha value
- Parameters:
-
| RGBA32 WKAL::Color::rgb |
( |
|
) |
const |
get rgba quadruplet
- Parameters:
-
| void WKAL::Color::setRGB |
( |
int |
r, |
|
|
int |
g, |
|
|
int |
b | |
|
) |
| | |
setRGB
- Parameters:
-
| [in] | : | red value |
| [in] | : | green value |
| [in] | : | blue value |
| void WKAL::Color::setRGB |
( |
RGBA32 |
rgb |
) |
|
| void WKAL::Color::getRGBA |
( |
float & |
r, |
|
|
float & |
g, |
|
|
float & |
b, |
|
|
float & |
a | |
|
) |
| | const |
getRGBA
- Parameters:
-
| [out] | : | red value |
| [out] | : | green value |
| [out] | : | blue value |
| [out] | : | alpha value |
| void WKAL::Color::getRGBA |
( |
double & |
r, |
|
|
double & |
g, |
|
|
double & |
b, |
|
|
double & |
a | |
|
) |
| | const |
getRGBA
- Parameters:
-
| [out] | : | red value |
| [out] | : | green value |
| [out] | : | blue value |
| [out] | : | alpha value |
| Color WKAL::Color::light |
( |
|
) |
const |
increase the light
- Parameters:
-
| Color WKAL::Color::dark |
( |
|
) |
const |
increase the dark
- Parameters:
-
blend
- Parameters:
-
| [in] | : | blend color |
| [out] | : | color result |
| Color WKAL::Color::blendWithWhite |
( |
|
) |
const |
blendWithWhite
- Parameters:
-
| [out] | : | color result Color b = c->blendWithWhite();
|
| static bool WKAL::Color::parseHexColor |
( |
const String & |
name, |
|
|
RGBA32 & |
rgb | |
|
) |
| | [static] |
parseHexColor
- Parameters:
-
| [in] | : | color name |
| [in] | : | rgba quadruplet value |
| [out] | : | true if the HexColor is parsed corectly |
Member Data Documentation
The documentation for this class was generated from the following file:
- /home/nef/EnvHaineko/haineko/home/developer/Doduo_sandlabs/BAL/WKAL/Skeletons/Graphics/Color.t