#include <cascade/graphics/CascadeColor.h>
Inheritance diagram for CascadeColor:
Public Member Functions | |
CascadeColor () | |
CascadeColor (u8 red, u8 green, u8 blue) | |
CascadeColor (u8 red, u8 green, u8 blue, u8 alpha) | |
CascadeColor (const CascadeColor &color) | |
void | SetRed (u8 red) |
void | SetGreen (u8 green) |
void | SetBlue (u8 blue) |
void | SetAlpha (u8 alpha) |
void | SetRGB (u8 red, u8 green, u8 blue) |
void | SetRGBA (u8 red, u8 green, u8 blue, u8 alpha) |
u8 | GetRed () |
u8 | GetGreen () |
u8 | GetBlue () |
u8 | GetAlpha () |
void | GetRGB (u8 &redToSet, u8 &greenToSet, u8 &blueToSet) |
void | GetRGBA (u8 &redToSet, u8 &greenToSet, u8 &blueToSet, u8 &alphaToSet) |
bool | operator== (const CascadeColor &colorThat) const |
Public Attributes | |
u32 | m_nColor |
CascadeColor represents color as a 32 bit quantity where the high 24 bits encode eight bits of red, green, and blue respectively and the low 8 bits represent alpha.
|
default constructor The default constructor for CascadeColor initializes the color to fully opaque black. |
|
opaque color constructor This constructor sets the color to a fully opaque color.
|
|
color constructor with alpha This constructor sets the color to a color value with alpha.
|
|
copy constructor This copy constructor copies the color from the color passed in.
|
|
gets the alpha value of the color GetAlpha() returns the alpha value of the color
|
|
gets the blue value of the color GetBlue() returns the blue value of the color
|
|
gets the green value of the color GetGreen() returns the green value of the color
|
|
gets the red value of the color GetRed() returns the red value of the color
|
|
gets the red, green, and blue values of the color GetRGB() gets the red, green, and blue values of the color by setting the reference parameters passed into the function.
|
|
gets the red, green, blue, and alpha values of the color GetRGBA() gets the red, green, blue, and alpha values of the color by setting the reference parameters passed into the function.
|
|
compars two colors for equality This == operator compars two colors for equality
|
|
sets the alpha value of the color SetAlpha() sets the alpha value of the color
|
|
sets the blue value of the color SetBlue() sets the blue value of the color
|
|
sets the green value of the color SetGreen() sets the green value of the color
|
|
sets the red value of the color SetRed() sets the red value of the color
|
|
sets the red, green and blue values of the color SetRGB() sets the red, green and blue values of the color
|
|
sets the red, green, blue, and alpha values of the color SetRGBA() sets the red, green, blue, and alpha values of the color
|
|
stores the internal color value m_nColor stores the encoded red, green, blue, and alpha values of the color in RGBA format. |