infinipaint/src/DrawingProgram/EraserTool.hpp

20 lines
512 B
C++
Raw Normal View History

2025-07-06 20:43:53 +03:00
#pragma once
#include <include/core/SkCanvas.h>
#include "../DrawData.hpp"
#include "../DrawComponents/DrawComponent.hpp"
class DrawingProgram;
class EraserTool {
public:
EraserTool(DrawingProgram& initDrawP);
void gui_toolbox();
void tool_update();
void draw(SkCanvas* canvas, const DrawData& drawData);
private:
std::vector<std::pair<uint64_t, std::shared_ptr<DrawComponent>>> erasedComponents; // <placement order, object>
DrawingProgram& drawP;
};