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::Style::Fill.

See also
CYICanvas::DrawPath

#include <graphics/YiPaint.h>

Public Types

enum  Style {
  Style::FillAndStroke,
  Style::Fill,
  Style::Stroke
}
 

Public Member Functions

 CYIPaint ()
 
virtual ~CYIPaint ()
 
void SetStyle (Style style)
 
Style GetStyle () const
 
void SetStrokeWidth (float strokeWidth)
 
float GetStrokeWidth () const
 
void SetFillColor (const CYIColor &fillColor)
 
CYIColor GetFillColor () const
 
void SetStrokeColor (const CYIColor &strokeColor)
 
CYIColor GetStrokeColor () const
 

Protected Attributes

Style m_style
 
float m_strokeWidth
 
CYIColor m_FillClr
 
CYIColor m_StrokeClr
 

Member Enumeration Documentation

◆ Style

enum CYIPaint::Style
strong

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

Enumerator
FillAndStroke 

Path will be filled and stroked.

Fill 

Path will be filled.

Stroke 

Path will be stroked.

Constructor & Destructor Documentation

◆ CYIPaint()

CYIPaint::CYIPaint ( )

◆ ~CYIPaint()

virtual CYIPaint::~CYIPaint ( )
virtual

Member Function Documentation

◆ GetFillColor()

CYIColor CYIPaint::GetFillColor ( ) const

Returns the fill color.

See also
SetFillColor

◆ GetStrokeColor()

CYIColor CYIPaint::GetStrokeColor ( ) const

Returns the stroke color.

See also
SetStrokeColor

◆ GetStrokeWidth()

float CYIPaint::GetStrokeWidth ( ) const

Returns the width of the stroke.

See also
SetStrokeWidth

◆ GetStyle()

Style CYIPaint::GetStyle ( ) const

Returns the paint style.

◆ SetFillColor()

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::Style::Fill or CYIPaint::Style::FillAndStroke.

◆ SetStrokeColor()

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::Style::Stroke or CYIPaint::Style::FillAndStroke.

◆ SetStrokeWidth()

void CYIPaint::SetStrokeWidth ( float  strokeWidth)

Sets the width of the stroke to strokeWidth, in pixels. The default stroke width is 1.0f. This will only be used when the style is CYIPaint::Style::Stroke or CYIPaint::Style::FillAndStroke.

◆ SetStyle()

void CYIPaint::SetStyle ( Style  style)

Sets the paint style to style.

Member Data Documentation

◆ m_FillClr

CYIColor CYIPaint::m_FillClr
protected

◆ m_StrokeClr

CYIColor CYIPaint::m_StrokeClr
protected

◆ m_strokeWidth

float CYIPaint::m_strokeWidth
protected

◆ m_style

Style CYIPaint::m_style
protected

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