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

CP_HPEN Class Reference

Class that provides a wrapper for the Windows HPEN.

List of all members.

Public Member Functions

Constructor / Destructor
 CP_HPEN ()
 Constructor.
 CP_HPEN (HPEN inHPEN)
 CP_HPEN (const CP_HPEN &inHPEN)
virtual ~CP_HPEN () throw ()
 Destructor.
Canvas
void UseInCanvas (CP_Canvas &inCanvas)
void ResetCanvas ()
void SetCanvas (CP_Canvas &inCanvas)
Getters
HPEN GetHPEN ()
UInt16 Size ()
CP_RGBColor GetColor () const
operators
CP_HPENoperator= (const CP_HPEN &inHPEN)
Save / Restore
void Save ()
void Restore ()
Setters
void SetSize (const USHORT inSize)
void SetColor (const CP_RGBColor &inColor)

Protected Member Functions

Misc
void UpdatePen ()

Protected Attributes

CP_Canvas fCanvas
HPEN fHPEN
CP_RGBColor fColor
UInt16 fSize
SInt16 fPenStyle
HPEN fSavedPen
SInt16 fSavedDCInstance


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_HPEN::CP_HPEN  ) 
 

Constructor.

Exceptions:
none 

CP_HPEN::CP_HPEN HPEN  inHPEN  ) 
 

Constructor.

Parameters:
inHPEN An existing Windows HPEN to use with this object.
Exceptions:
none 

CP_HPEN::CP_HPEN const CP_HPEN inHPEN  ) 
 

Copy constructor.

Parameters:
inHPEN CP_HPEN class to copy the fields from.
Exceptions:
none 

CP_HPEN::~CP_HPEN  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

void CP_HPEN::UseInCanvas CP_Canvas inCanvas  ) 
 

Sets the canvas object to use this pen with. This will also update the Windows HPEN for use in the passed in canvas.

Parameters:
inCanvas The CP_Canvas to use the pen in.
Exceptions:
none 
Returns:
void

void CP_HPEN::ResetCanvas  ) 
 

Releases the pen from the CP_Canvas object.

Exceptions:
none 
Returns:
void

void CP_HPEN::SetCanvas CP_Canvas inCanvas  ) 
 

Sets the canvas that this pen is used with.

Parameters:
inCanvas The CP_Canvas object the pen is used with.
Exceptions:
none 
Returns:
void

HPEN CP_HPEN::GetHPEN  ) 
 

Returns the Windows HPEN associated with this class.

Exceptions:
none 
Returns:
HPEN The Windows HPEN associated with this object.

UInt16 CP_HPEN::Size  ) 
 

Returns the stroke size that the pen draws in.

Exceptions:
none 
Returns:
UInt16 The size of the pens stroke when drawing.

CP_RGBColor CP_HPEN::GetColor  )  const
 

Returns the color that the pen draws in.

Exceptions:
none 
Returns:
CP_RGBColor The color of the pen when drawing.

CP_HPEN & CP_HPEN::operator= const CP_HPEN inHPEN  ) 
 

Assignment operator. This will set the fields of this object to those of the passed in CP_HPEN object.

Exceptions:
none 
Returns:
CP_HPEN Returns a reference to ourselves.

void CP_HPEN::Save  ) 
 

Saves the current state of this pen object

Exceptions:
none 
Returns:
void

void CP_HPEN::Restore  ) 
 

Restores the previously saved state of this object. Each call to Restore(), must be preceded by a call to Save().

Exceptions:
none 
Returns:
void

void CP_HPEN::SetSize const USHORT  inSize  ) 
 

void CP_HPEN::SetColor const CP_RGBColor inColor  ) 
 

Sets the stroke color of the pen.

Parameters:
inColor The stroke color used by this pen.
Exceptions:
none 
Returns:
void

void CP_HPEN::UpdatePen  )  [protected]
 

Recreates the Windows HPEN object for use in the CP_Canvas object.

Exceptions:
none 
Returns:
void


Member Data Documentation

CP_Canvas CP_HPEN::fCanvas [protected]
 

HPEN CP_HPEN::fHPEN [protected]
 

CP_Canvas object the pen is used in.

CP_RGBColor CP_HPEN::fColor [protected]
 

The HPEN we manage.

UInt16 CP_HPEN::fSize [protected]
 

Color of our pen stroke (foreground)

SInt16 CP_HPEN::fPenStyle [protected]
 

Size of the pen stroke.

HPEN CP_HPEN::fSavedPen [protected]
 

Style of the pens stroke.

SInt16 CP_HPEN::fSavedDCInstance [protected]
 

Saved HPEN, used when restoring.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:44 2005 for CPLAT by  doxygen 1.4.0