How can i implement "Undo" action in this example?
I have tried to look at description of undo framework here, but not understand how can i
use this for my purpose in this example...
Printable View
Each operation you perform has to be embedded in a semantic command (e.g. "draw point", "draw line") that can perform the operation and also perform the inverse of it (so in case of "draw point" it would restore the state of the environment to exactly what it was before the point was drawn).