Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_RGBColor Class Reference

A class to handle management of a color in RGB format, and provide conversion to and from the underlying OSs native format of a color representation.

List of all members.

Public Member Functions

Constructor / Destructor
 CP_RGBColor ()
 Constructor.
 CP_RGBColor (UInt16 inRed, UInt16 inGreen, UInt16 inBlue)
 CP_RGBColor (const CP_RGBColor &inColor)
 CP_RGBColor (RGBColor inColor)
virtual ~CP_RGBColor ()
 Destructor.
Converters
 operator RGBColor * ()
 operator const RGBColor * () const
 operator RGBColor ()
 operator const RGBColor () const
Getters
UInt16 red () const
UInt16 green () const
UInt16 blue () const
RGBColor GetRGBColor ()
RGBColor GetRGBColor () const
operators
bool operator== (const CP_RGBColor &inColor) const
bool operator!= (const CP_RGBColor &inColor) const
CP_RGBColoroperator= (const CP_RGBColor &inColor)
Setters
void Set (UInt16 inRed, UInt16 inGreen, UInt16 inBlue)
void Set (const CP_RGBColor &inColor)
void Set (const RGBColor inColor)
void Lighten ()
void Darken ()

Protected Attributes

UInt16 fRed
UInt16 fGreen
UInt16 fBlue


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_RGBColor::CP_RGBColor  ) 
 

Constructor. Sets the color to black.

CP_RGBColor::CP_RGBColor UInt16  inRed,
UInt16  inGreen,
UInt16  inBlue
 

Constructor.

Parameters:
inRed - red color component.
inGreen - green color component.
inBlue - blue color component.

CP_RGBColor::CP_RGBColor const CP_RGBColor inColor  ) 
 

Copy constructor.

CP_RGBColor::CP_RGBColor RGBColor  inColor  ) 
 

Constructor from a Mac RGBColor.

Parameters:
inColor - a MacOS RGBColor to set this color to.

CP_RGBColor::~CP_RGBColor  )  [virtual]
 

Destructor.


Member Function Documentation

CP_RGBColor::operator RGBColor *  ) 
 

Operator RGBColor *. Return ourselves converted to a MacOS RGBColor *.

CP_RGBColor::operator const RGBColor *  )  const
 

Operator RGBColor *. Return ourselves converted to a MacOS RGBColor * const version.

CP_RGBColor::operator RGBColor  ) 
 

Operator RGBColor. Return ourselves converted to a MacOS RGBColor.

CP_RGBColor::operator const RGBColor  )  const
 

Operator RGBColor. Return ourselves converted to a MacOS RGBColor const version.

UInt16 CP_RGBColor::red  )  const
 

Return the red component of the color as a UInt16.

UInt16 CP_RGBColor::green  )  const
 

Return the green component of the color as a UInt16.

UInt16 CP_RGBColor::blue  )  const
 

Return the blue component of the color as a UInt16.

RGBColor CP_RGBColor::GetRGBColor  ) 
 

Return ourselves converted to a MacOS RGBColor const version.

RGBColor CP_RGBColor::GetRGBColor  )  const
 

Return ourselves converted to a MacOS RGBColor const version.

bool CP_RGBColor::operator== const CP_RGBColor inColor  )  const
 

Equality operator. Return true if the passed in CP_RGBColor is equal to this color.

Parameters:
inColor - the CP_RGBColor to test against.

bool CP_RGBColor::operator!= const CP_RGBColor inColor  )  const
 

Operator not equal. Return true if the passed in CP_RGBColor is not equal to this color.

Parameters:
inColor - the CP_RGBColor to test against.

CP_RGBColor & CP_RGBColor::operator= const CP_RGBColor inColor  ) 
 

Assignment operator. Assign the color components of the passed in inColor to ourselves.

Parameters:
inColor - a CP_RGBColor we are copying.

void CP_RGBColor::Set UInt16  inRed,
UInt16  inGreen,
UInt16  inBlue
 

Set the color components to the values passed in.

Parameters:
inRed - red color component.
inGreen - green color component.
inBlue - blue color component.

void CP_RGBColor::Set const CP_RGBColor inColor  ) 
 

Sets the color from the passed in CP_RGBColor object.

Parameters:
inColor A CP_RGBColor object to set the color from.
Exceptions:
none 
Returns:
void

void CP_RGBColor::Set const RGBColor  inColor  ) 
 

Set the color components from the passed in MacOS RGBColor.

Parameters:
inColor - MacOS RGBColor.

void CP_RGBColor::Lighten  ) 
 

Lighten the color.

void CP_RGBColor::Darken  ) 
 

Darken the color.


Member Data Documentation

UInt16 CP_RGBColor::fRed [protected]
 

UInt16 CP_RGBColor::fGreen [protected]
 

The red color component.

UInt16 CP_RGBColor::fBlue [protected]
 

The green color component.


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:22:03 2005 for CPLAT_MacOS by  doxygen 1.4.0