implement animation panel interaction

This commit is contained in:
2019-10-17 20:42:52 +02:00
parent 62863e7224
commit 7487feb168
14 changed files with 399 additions and 16 deletions

View File

@@ -108,6 +108,7 @@ public:
std::unique_ptr<Stroke> m_dual_stroke;
bool m_show_tmp = false;
std::vector<std::shared_ptr<Layer>> m_layers;
int m_anim_frame = 1;
Layer m_layers_merge;
std::vector<glm::vec2> m_plane_shape[6]; // screen space projection of the plane
glm::mat4 m_plane_unproject[6] = SIXPLETTE(glm::mat4(1));
@@ -176,10 +177,13 @@ public:
bool create(int width, int height);
void resize(int width, int height);
Layer& layer() { return *m_layers[m_current_layer_idx]; }
std::shared_ptr<Layer> layer_with_id(uint32_t id);
void layer_remove(int idx);
void layer_add(std::string name, std::shared_ptr<Layer> layer = nullptr, int index = 0);
void layer_order(int idx, int pos);
void layer_merge(int source_idx, int dest_idx);
int anim_duration() const noexcept;
void anim_goto_frame(int frame) noexcept;
void flood_fill(int layer, int plane, std::vector<glm::ivec2> pos, FloodData& plane_data,
float threshold, glm::vec4 dest_color, std::unique_ptr<glm::vec4>& source_color);
void stroke_start(glm::vec3 point, float pressure);