u02: Add star tool skeleton

This commit is contained in:
Simon Bruder 2023-05-10 16:59:55 +02:00
parent 0d316d7aeb
commit 7e06373aa1
2 changed files with 25 additions and 0 deletions

13
u02/include/star_tool.h Normal file
View file

@ -0,0 +1,13 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include "tool_base.h"
class star_tool : public tool_base {
public:
star_tool(canvas_buffer &canvas);
void draw(int x0, int y0, int x1, int y1);
void set_text(std::stringstream &stream);
};

12
u02/src/star_tool.cpp Normal file
View file

@ -0,0 +1,12 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#include "star_tool.h"
#include <cmath>
#include <util.h>
star_tool::star_tool(canvas_buffer &canvas) : tool_base(canvas) {
shape = TS_CIRCLE; // TODO: Use star for preview
}
void star_tool::draw(int x0, int y0, int x1, int y1) {}
void star_tool::set_text(std::stringstream &stream) { stream << "Tool: Star"; }