This PR adds functionality for Undo, Redo and Clear actions. The ideas was to use a Stack to store the Path Points and when Undo or Redo action is called, we pop or push from the stack. Documentation has been added to the code so anyone reading this will understand how the functionality was thought out.
Undo Action will remove the most recent drawn path.
Redo Action will replace the current Undo action and redraw the Draw points currently undone.
Clear Action will remove all draw points drawn on Canvas. That means we CANNOT trigger undo/redo because the stack is currently Empty
This PR adds functionality for
Undo
,Redo
andClear
actions. The ideas was to use aStack
to store the Path Points and whenUndo
orRedo
action is called, we pop or push from the stack. Documentation has been added to the code so anyone reading this will understand how the functionality was thought out.Undo
Action will remove the most recent drawn path.Redo
Action will replace the currentUndo
action and redraw the Draw points currently undone.Clear
Action will remove all draw points drawn on Canvas. That means we CANNOT triggerundo
/redo
because the stack is currently EmptyFIxes #18