u02: Add star tool skeleton
This commit is contained in:
parent
0d316d7aeb
commit
7e06373aa1
13
u02/include/star_tool.h
Normal file
13
u02/include/star_tool.h
Normal 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
12
u02/src/star_tool.cpp
Normal 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"; }
|
Reference in a new issue