refactor Brush to be used in shared_ptr
This commit is contained in:
@@ -191,7 +191,7 @@ public:
|
||||
float m_cam_fov = 85;
|
||||
glm::vec2 m_cur_pos;
|
||||
|
||||
Brush m_current_brush;
|
||||
std::shared_ptr<Brush> m_current_brush;
|
||||
|
||||
enum class kCanvasMode { Draw, Erase, Line, Camera, Grid, Transform, Fill, MaskFree, MaskLine, COUNT };
|
||||
kCanvasMode m_state{ kCanvasMode::Draw };
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
void layer_add(std::string name);
|
||||
void layer_order(int idx, int pos);
|
||||
void layer_merge(int source_idx, int dest_idx);
|
||||
void stroke_start(glm::vec3 point, float pressure, const Brush& brush);
|
||||
void stroke_start(glm::vec3 point, float pressure, const std::shared_ptr<Brush>& brush);
|
||||
void stroke_update(glm::vec3 point, float pressure);
|
||||
void stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz);
|
||||
void stroke_draw();
|
||||
|
||||
Reference in New Issue
Block a user