From 0fae793f2893c2d9fe0fc747143360eaf425b974 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sun, 7 May 2023 15:23:33 +0200 Subject: [PATCH] u02/tool_base: Add draw with no point --- 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 9a67b1e..6985031 100644 --- a/u02/include/tool_base.h +++ b/u02/include/tool_base.h @@ -35,6 +35,8 @@ public: // Initialize the tool and store a reference of a canvas_buffer tool_base(canvas_buffer &canvas); + // Draw with no point provided + virtual void draw(); // Draw with one point provided virtual void draw(int x, int y); // Draw with two points provided diff --git a/u02/src/tool_base.cpp b/u02/src/tool_base.cpp index 90f4edf..0b420e1 100644 --- a/u02/src/tool_base.cpp +++ b/u02/src/tool_base.cpp @@ -11,6 +11,12 @@ tool_base::tool_base(canvas_buffer &canvas) : canvas(canvas) { is_draggable = true; } +// Draw with no point provided +void tool_base::draw() { + // Nothing implemented here. Children of this class can implement + // this method if needed +} + // Draw with one point provided void tool_base::draw(int x, int y) { // Nothing implemented here. Children of this class can implement