As a developer, I want to refactor the tool system. The code is all over the place and adding new tools is tedious and error-prone. Refactoring should improve code quality, thus making the addition of new tools easier.
Implementation idea
a base class M2Tool with methods activate, userAction{ClickAt:,MoveDrawing:,StopDrawing}, deactivate
subclass M2BrushTool (pencil, eraser, circle, triangle) with a Pen
subclass M2MorphTool with an M2TemporaryGeometricMorph
sublclass M2GeometricTool (rectangle, ellipse, triangle, n-gon (#117)) for commiting the drawn shape teaching/SketchMorph2
subclass M2SelectionTool (rectangle, lasso) for copying the drawn shape
As a developer, I want to refactor the tool system. The code is all over the place and adding new tools is tedious and error-prone. Refactoring should improve code quality, thus making the addition of new tools easier.
Implementation idea
M2Tool
with methodsactivate
,userAction{ClickAt:,MoveDrawing:,StopDrawing}
,deactivate
M2BrushTool
(pencil, eraser, circle, triangle) with aPen
M2MorphTool
with anM2TemporaryGeometricMorph
M2GeometricTool
(rectangle, ellipse, triangle, n-gon (#117)) for commiting the drawn shape teaching/SketchMorph2M2SelectionTool
(rectangle, lasso) for copying the drawn shape