Undo/redo functions are applied for drawing.