You.i Engine
CYIPaint Class Reference

Detailed Description

Descriptor for drawing vector graphics.

This descriptor class is used by CYICanvas to describe the style properties of a CYIPath. The default style is CYIPaint::FILL.

See also
CYICanvas::DrawPath

#include <graphics/YiPaint.h>

Public Types

enum  STYLE {
  FILL_AND_STROKE,
  FILL,
  STROKE
}
 

Public Member Functions

 CYIPaint ()
 
virtual ~CYIPaint ()
 
void SetStyle (STYLE eStyle)
 
STYLE GetStyle () const
 
void SetStrokeWidth (float fStrokeWidth)
 
float GetStrokeWidth () const
 
void SetFillColor (const CYIColor &fillColor)
 
CYIColor GetFillColor () const
 
void SetStrokeColor (const CYIColor &strokeColor)
 
CYIColor GetStrokeColor () const
 

Protected Attributes

STYLE m_eStyle
 
float m_fStrokeWidth
 
CYIColor m_FillClr
 
CYIColor m_StrokeClr
 

Member Enumeration Documentation

Enumeration of styles which will be used when drawing a CYIPath on a CYICanvas.

Enumerator
FILL_AND_STROKE 

Path will be filled and stroked.

FILL 

Path will be filled.

STROKE 

Path will be stroked.

Constructor & Destructor Documentation

CYIPaint::CYIPaint ( )
virtual CYIPaint::~CYIPaint ( )
virtual

Member Function Documentation

CYIColor CYIPaint::GetFillColor ( ) const

Returns the fill color.

See also
SetFillColor
CYIColor CYIPaint::GetStrokeColor ( ) const

Returns the stroke color.

See also
SetStrokeColor
float CYIPaint::GetStrokeWidth ( ) const

Returns the width of the stroke.

See also
SetStrokeWidth
STYLE CYIPaint::GetStyle ( ) const

Returns the paint style.

void CYIPaint::SetFillColor ( const CYIColor fillColor)

Sets the fill color to fillColor. The default color is CYIColor::Named().White. This will only be used when the style is CYIPaint::FILL or CYIPaint::FILL_AND_STROKE.

void CYIPaint::SetStrokeColor ( const CYIColor strokeColor)

Sets the stroke color. The default color is CYIColor::Named().White This will only be used when the style is CYIPaint::STROKE or CYIPaint::FILL_AND_STROKE.

void CYIPaint::SetStrokeWidth ( float  fStrokeWidth)

Sets the width of the stroke to fStrokeWidth, in pixels. The default stroke width is 1.0f. This will only be used when the style is CYIPaint::STROKE or CYIPaint::FILL_AND_STROKE.

void CYIPaint::SetStyle ( STYLE  eStyle)

Sets the paint style to eStyle.

Member Data Documentation

STYLE CYIPaint::m_eStyle
protected
CYIColor CYIPaint::m_FillClr
protected
float CYIPaint::m_fStrokeWidth
protected
CYIColor CYIPaint::m_StrokeClr
protected

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