diff --git a/u02/include/star_tool.h b/u02/include/star_tool.h new file mode 100644 index 0000000..dbc07a4 --- /dev/null +++ b/u02/include/star_tool.h @@ -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); +}; diff --git a/u02/src/star_tool.cpp b/u02/src/star_tool.cpp new file mode 100644 index 0000000..41d5ece --- /dev/null +++ b/u02/src/star_tool.cpp @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: LGPL-3.0-or-later +#include "star_tool.h" +#include +#include + +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"; }