Public Member Functions | Public Attributes

VGColor Class Reference
[Virtual Graphic System]

Generic class to manipulate device independant colors. More...

List of all members.

Public Member Functions

 VGColor (unsigned char gray=0)
 VGColor (const VGColor &in)
 VGColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
 VGColor (const unsigned char col[4])
void Set (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
void Set (const VGColor &in)
bool operator== (const VGColor &col) const
bool operator!= (const VGColor &col) const
VGColoroperator+= (short v)
std::ostream & print (std::ostream &out) const

Public Attributes

unsigned char mRed
unsigned char mGreen
unsigned char mBlue
unsigned char mAlpha

Detailed Description

Generic class to manipulate device independant colors.


Constructor & Destructor Documentation

VGColor ( unsigned char  gray = 0 ) [inline]
VGColor ( const VGColor in ) [inline]

References Set().

VGColor ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a = 255 
) [inline]
VGColor ( const unsigned char  col[4] ) [inline, explicit]

References Set().


Member Function Documentation

void Set ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a = 255 
) [inline]

References mAlpha, mBlue, mGreen, and mRed.

Referenced by VGColor().

void Set ( const VGColor in ) [inline]

References mAlpha, mBlue, mGreen, and mRed.

bool operator== ( const VGColor col ) const [inline]

References mAlpha, mBlue, mGreen, and mRed.

bool operator!= ( const VGColor col ) const [inline]

References mAlpha, mBlue, mGreen, and mRed.

std::ostream& print ( std::ostream &  out ) const [inline]

References mAlpha, mBlue, mGreen, and mRed.


Member Data Documentation

unsigned char mRed
unsigned char mGreen
unsigned char mBlue
unsigned char mAlpha

Referenced by operator!=(), operator==(), print(), and Set().