You.i Engine
YiCanvas.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_CANVAS_H_
3 #define _YI_CANVAS_H_
4 
5 #include "framework/YiPredef.h"
7 #include <glm/gtc/type_ptr.hpp>
8 
14 class CYIBitmap;
15 class CYIColor;
16 class CYIPath;
17 class CYIPaint;
18 
22 class CYICanvas
23 {
24 public:
25  CYICanvas();
26  virtual ~CYICanvas();
27 
32  void SetBitmap(CYIBitmap *pBitmap);
33 
36  void DrawPath(const CYIPath *pPath, const CYIPaint &paint);
37 
40  void DrawColor(const CYIColor &clr);
41 
44  void SetMatrix(const glm::mat3x3 &matrix);
45 
48  const glm::mat3x3 &GetMatrix() const;
49 
52  void Translate(const glm::vec2 &translate);
53 
56  void Scale(const glm::vec2 &scale);
57 
60  void Rotate(float fRotation);
61 
62 protected:
63 
64  void TransformPolygonData(const CYIPolygonData &polygonDataIn, CYIPolygonData *pPolygonDataOut);
65 
66  glm::mat3x3 m_Matrix;
69 
70 private:
72 };
73 
76 #endif // _YI_CANVAS_H_
77 
CYIBitmap * m_pBitmap
Definition: YiCanvas.h:67
const glm::mat3x3 & GetMatrix() const
#define YI_DISALLOW_COPY_AND_ASSIGN(TypeName)
Delete the copy constructor and assignment operator (and consequently the move constructor as well) ...
Definition: YiPredef.h:114
void TransformPolygonData(const CYIPolygonData &polygonDataIn, CYIPolygonData *pPolygonDataOut)
glm::mat3x3 m_Matrix
Definition: YiCanvas.h:66
The core bitmap container class used by You.i Engine.
Definition: YiBitmap.h:20
std::vector< YI_POLYGON_VERTEX > CYIPolygonData
A type representing multiple vertices of a polygon.
Definition: YiPolygonFill.h:32
Draws vector graphics to a bitmap.
Definition: YiCanvas.h:22
Descriptor for drawing vector graphics.
Definition: YiPaint.h:21
void DrawColor(const CYIColor &clr)
void SetBitmap(CYIBitmap *pBitmap)
void Scale(const glm::vec2 &scale)
void SetMatrix(const glm::mat3x3 &matrix)
A class that contains information on how a path will be drawn.
Definition: YiPath.h:50
void DrawPath(const CYIPath *pPath, const CYIPaint &paint)
void Translate(const glm::vec2 &translate)
virtual ~CYICanvas()
void Rotate(float fRotation)
A class used to represent a color value.
Definition: YiColor.h:31
CYIPolygonFill * m_pPolygonFill
Definition: YiCanvas.h:68
A class that contains information on how to fill a polygon.
Definition: YiPolygonFill.h:44