Pyrogenesis  trunk
Public Member Functions | Public Attributes | List of all members
CColor Struct Reference

#include <Shapes.h>

Public Member Functions

 CColor ()
 
 CColor (float cr, float cg, float cb, float ca)
 
bool ParseString (const CStr8 &Value, int DefaultAlpha=255)
 Try to parse Value as a color. More...
 
bool operator== (const CColor &color) const
 
bool operator!= (const CColor &color) const
 
const float * FloatArray () const
 
SColor4ub AsSColor4ub () const
 

Public Attributes

float r
 
float g
 
float b
 
float a
 

Constructor & Destructor Documentation

CColor::CColor ( )
inline
CColor::CColor ( float  cr,
float  cg,
float  cb,
float  ca 
)
inline

Member Function Documentation

SColor4ub CColor::AsSColor4ub ( ) const
inline
const float* CColor::FloatArray ( ) const
inline
bool CColor::operator!= ( const CColor color) const
inline
bool CColor::operator== ( const CColor color) const
bool CColor::ParseString ( const CStr8 &  Value,
int  DefaultAlpha = 255 
)

Try to parse Value as a color.

Returns true on success, false otherwise.

Parameters
ValueShould be "r g b" or "r g b a" where each value is an integer in [0,255].
DefaultAlphaThe alpha value that is used if the format of Value is "r g b".

Member Data Documentation

float CColor::a
float CColor::b
float CColor::g
float CColor::r

The documentation for this struct was generated from the following files: