You.i Engine
CYICanvas Class Reference

Detailed Description

Draws vector graphics to a bitmap.

#include <graphics/YiCanvas.h>

Public Member Functions

 CYICanvas ()
 
virtual ~CYICanvas ()
 
void SetBitmap (CYIBitmap *pBitmap)
 
void DrawPath (const CYIPath *pPath, const CYIPaint &paint)
 
void DrawColor (const CYIColor &clr)
 
void SetMatrix (const glm::mat3x3 &matrix)
 
const glm::mat3x3 & GetMatrix () const
 
void Translate (const glm::vec2 &translate)
 
void Scale (const glm::vec2 &scale)
 
void Rotate (float fRotation)
 

Protected Member Functions

void TransformPolygonData (const CYIPolygonData &polygonDataIn, CYIPolygonData *pPolygonDataOut)
 

Protected Attributes

glm::mat3x3 m_Matrix
 
CYIBitmapm_pBitmap
 
CYIPolygonFillm_pPolygonFill
 

Constructor & Destructor Documentation

CYICanvas::CYICanvas ( )
virtual CYICanvas::~CYICanvas ( )
virtual

Member Function Documentation

void CYICanvas::DrawColor ( const CYIColor clr)

Draws the entire buffer with a given color.

void CYICanvas::DrawPath ( const CYIPath pPath,
const CYIPaint paint 
)

Draws a path with the given paint.

const glm::mat3x3& CYICanvas::GetMatrix ( ) const

Get current transform matrix.

void CYICanvas::Rotate ( float  fRotation)

Apply rotation (degrees) to matrix.

void CYICanvas::Scale ( const glm::vec2 &  scale)

Apply scale to matrix.

void CYICanvas::SetBitmap ( CYIBitmap pBitmap)

Sets the current destination buffer.

Note
This object does not take ownership of the provided pointer.
void CYICanvas::SetMatrix ( const glm::mat3x3 &  matrix)

Set entirely new matrix.

void CYICanvas::TransformPolygonData ( const CYIPolygonData polygonDataIn,
CYIPolygonData pPolygonDataOut 
)
protected
void CYICanvas::Translate ( const glm::vec2 &  translate)

Apply translate to matrix.

Member Data Documentation

glm::mat3x3 CYICanvas::m_Matrix
protected
CYIBitmap* CYICanvas::m_pBitmap
protected
CYIPolygonFill* CYICanvas::m_pPolygonFill
protected

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