improving actions history
This commit is contained in:
45
src/canvas_layer.h
Normal file
45
src/canvas_layer.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
#include "rtt.h"
|
||||
#include "log.h"
|
||||
|
||||
class LayerFrame
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
class Layer
|
||||
{
|
||||
public:
|
||||
Layer() = default;
|
||||
Layer(const Layer&) = delete;
|
||||
~Layer() { LOG("LAYER AUTO DESTROY"); destroy(); }
|
||||
RTT m_rtt[6];
|
||||
glm::vec4 m_dirty_box[6] = SIXPLETTE(glm::vec4(0));
|
||||
bool m_dirty_face[6] = SIXPLETTE(false);
|
||||
bool m_visible = true;
|
||||
bool m_alpha_locked = false;
|
||||
float m_opacity = 1.f;
|
||||
bool m_hightlight = false;
|
||||
int m_blend_mode = 0;
|
||||
std::string m_name;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
struct Snapshot
|
||||
{
|
||||
std::unique_ptr<uint8_t[]> image[6] = SIXPLETTE(0);
|
||||
glm::vec4 m_dirty_box[6] = SIXPLETTE(glm::vec4(0));
|
||||
bool m_dirty_face[6] = SIXPLETTE(false);
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
void create(int w, int h);
|
||||
void clear();
|
||||
void optimize();
|
||||
};
|
||||
void resize(int width, int height);
|
||||
bool create(int width, int height, std::string name);
|
||||
void clear(const glm::vec4& c);
|
||||
Snapshot snapshot();
|
||||
void restore(const Snapshot& snap);
|
||||
void destroy();
|
||||
void optimize();
|
||||
};
|
||||
Reference in New Issue
Block a user