canvas pan/zoom, project into canvas using inverse transform, implement eraser (early prototype)

This commit is contained in:
2017-04-09 22:40:38 +01:00
parent 8d35d1f140
commit a82c76ce41
6 changed files with 124 additions and 75 deletions

View File

@@ -13,6 +13,8 @@ class Canvas
BrushMesh m_mesh;
bool m_dirty = false;
public:
bool m_erase = false;
glm::mat4 m_mvp;
int m_width;
int m_height;
bool m_use_instanced = false;
@@ -36,7 +38,7 @@ public:
void stroke_draw();
void stroke_end();
void stroke_commit();
void clear(const glm::vec4& color = { 0, 0, 0, 1 });
void clear(const glm::vec4& color = { 1, 1, 1, 1 });
};
NS_END