Added line tool

This commit is contained in:
Yousef Khadadeh 2026-01-08 11:13:49 +03:00
parent 84daf3c556
commit 74b0fe76c3
8 changed files with 197 additions and 1 deletions

View file

@ -13,6 +13,7 @@
#include "EditTool.hpp"
#include "GridModifyTool.hpp"
#include "ZoomCanvasTool.hpp"
#include "LineDrawTool.hpp"
DrawingProgramToolBase::DrawingProgramToolBase(DrawingProgram& initDrawP):
drawP(initDrawP)
@ -48,6 +49,8 @@ std::unique_ptr<DrawingProgramToolBase> DrawingProgramToolBase::allocate_tool_ty
return std::make_unique<ZoomCanvasTool>(drawP);
case DrawingProgramToolType::PAN:
return std::make_unique<PanCanvasTool>(drawP);
case DrawingProgramToolType::LINE:
return std::make_unique<LineDrawTool>(drawP);
}
return nullptr;
}