From edb9e7400c22f5b86c059764d3b2664baf45f523 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sun, 7 May 2023 15:23:49 +0200 Subject: [PATCH] u02/tool_base: Add draw with three points --- u02/include/tool_base.h | 2 ++ u02/src/tool_base.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/u02/include/tool_base.h b/u02/include/tool_base.h index 6985031..0d06b97 100644 --- a/u02/include/tool_base.h +++ b/u02/include/tool_base.h @@ -41,6 +41,8 @@ public: virtual void draw(int x, int y); // Draw with two points provided virtual void draw(int x0, int y0, int x1, int y1); + // Draw with three points provided + virtual void draw(int x0, int y0, int x1, int y1, int x2, int y2); // Get the shape that this tool will draw const ToolShape get_shape() const; diff --git a/u02/src/tool_base.cpp b/u02/src/tool_base.cpp index 0b420e1..02eee44 100644 --- a/u02/src/tool_base.cpp +++ b/u02/src/tool_base.cpp @@ -29,6 +29,12 @@ void tool_base::draw(int from_x, int from_y, int to_x, int to_y) { // this method if needed } +// Draw with three points provided +void tool_base::draw(int x0, int y0, int x1, int y1, int x2, int y2) { + // Nothing implemented here. Children of this class can implement + // this method if needed +} + // Get the shape that this tool will draw const ToolShape tool_base::get_shape() const { return shape; }