Fbada006 / ArtMaker

ArtMaker is a flexible and customisable library that allows users to draw anything they want on screen and has been built fully with Jetpack Compose.
75 stars 3 forks source link

Undo/Redo/Clear Actions #36

Closed CalebKL closed 3 months ago

CalebKL commented 4 months ago

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

FIxes #18

CalebKL commented 4 months ago

@Fbada006 @emmanuelmuturia ready for review

emmanuelmuturia commented 4 months ago

Let me look at it in the evening as previously agreed...