pleyo.com

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

WKAL::Color::Color (  ) 

Color default constructor.

 Color c;

WKAL::Color::Color ( RGBA32  col  ) 

Color constructor.

Parameters:
[in] : rgba quadruplet
 Color *c = new Color(rgba);

WKAL::Color::Color ( int  r,
int  g,
int  b 
)

Color constructor.

Parameters:
[in] : red value
[in] : green value
[in] : blue value
 Color *c = new Color(255, 0, 0);

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
 Color *c = new Color(255, 0, 0, 255);

WKAL::Color::Color ( const String &   )  [explicit]

Color constructor.

Parameters:
[in] : string
 Color *c = new Color(s);

WKAL::Color::Color ( const char *   )  [explicit]

Color constructor.

Parameters:
[in] : string
 Color *c = new Color(char);

WKAL::Color::Color ( const BalColor &   ) 

Color platform constructor.

 Color *c = new Color(balColor);


Member Function Documentation

String WKAL::Color::name (  )  const

get name

Parameters:
[out] : name
 String n = c->name();

void WKAL::Color::setNamedColor ( const String &   ) 

set named color

Parameters:
[in] : color name
 c->setNameColor(name);

bool WKAL::Color::isValid (  )  const

test if the color is valid

Parameters:
[out] : true if the color is valid
 bool v = c->isValid();

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:
[out] : red value
 int r = c->red();

int WKAL::Color::green (  )  const

get green value

Parameters:
[out] : green value
 int g = c->green();

int WKAL::Color::blue (  )  const

get blue value

Parameters:
[out] : blue value
 int b = c->blue();

int WKAL::Color::alpha (  )  const

get alpha value

Parameters:
[out] : alpha value
 int a = c->alpha();

RGBA32 WKAL::Color::rgb (  )  const

get rgba quadruplet

Parameters:
[out] : rgba quadruplet
 RGBA32 r = c->rgb();

void WKAL::Color::setRGB ( int  r,
int  g,
int  b 
)

setRGB

Parameters:
[in] : red value
[in] : green value
[in] : blue value
 c->setRGB(255, 0, 0);

void WKAL::Color::setRGB ( RGBA32  rgb  ) 

setRGB

Parameters:
[in] : rgba quadruplet
 c->setRGB(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
 c->getRGBA(r, g, b, a);

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
 c->getRGBA(r, g, b, a);

Color WKAL::Color::light (  )  const

increase the light

Parameters:
[out] : result color
 Color l = c->light();

Color WKAL::Color::dark (  )  const

increase the dark

Parameters:
[out] : result color
 Color l = c->dark();

Color WKAL::Color::blend ( const Color  )  const

blend

Parameters:
[in] : blend color
[out] : color result
 Color b = c->blend(c);

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

const RGBA32 WKAL::Color::black = 0xFF000000 [static]

const RGBA32 WKAL::Color::white = 0xFFFFFFFF [static]

const RGBA32 WKAL::Color::darkGray = 0xFF808080 [static]

const RGBA32 WKAL::Color::gray = 0xFFA0A0A0 [static]

const RGBA32 WKAL::Color::lightGray = 0xFFC0C0C0 [static]

const RGBA32 WKAL::Color::transparent = 0x00000000 [static]


The documentation for this class was generated from the following file:

Generated on Mon Jun 30 16:22:08 2008 for Origyn Web Browser by Doxygen 1.5.5

pleyo.com
pleyo.com