C# Class Paint.PictureStateManager

Picture State manager - undo, redo, save.
Inheritance: IPictureStateManager
Mostrar archivo Open project: RandolphBurt/MonoGame-iOS-SimplePaint

Public Methods

Method Description
Draw ( List touchPoints ) : void

Draw the latest updates to our image/render target. The list of all gestures / locations touched by the user since the last update

InitialisePictureState ( bool newImage ) : void

Initialise the picture state manager

PictureStateManager ( IFilenameResolver filenameResolver, IPictureIOManager pictureIOManager, IRenderTargertHandler renderTargetHandler, ImageStateData imageStateData ) : System

Initializes a new instance of the Paint.PictureStateManager class.

Redo ( ) : void

Redo the most recent undo.

Save ( ) : void

Save the image in its current state

Undo ( ) : void

Undo the most recent change

Protected Methods

Method Description
OnRedoEnabledChanged ( EventArgs e ) : void

Raises the redo ebabled changed event.

OnUndoEnabledChanged ( EventArgs e ) : void

Raises the undo ebabled changed event.

Private Methods

Method Description
LoadSavePointData ( ) : void

Loads the save point data. Loads the CanvasRecorder file from the working folder Gets the image from the specific in memory rendertarget and draws that to the master canvas (rendertarget)

StoreSavePointData ( ) : void

Stores the save point data. Saves the CanvasRecorder file to disk in the working folder Saves the current image into an in memory RenderTarget

StoreWorkingImageStateData ( ) : void

Persists the working image state data to disk

Method Details

Draw() public method

Draw the latest updates to our image/render target. The list of all gestures / locations touched by the user since the last update
public Draw ( List touchPoints ) : void
touchPoints List
return void

InitialisePictureState() public method

Initialise the picture state manager
public InitialisePictureState ( bool newImage ) : void
newImage bool
return void

OnRedoEnabledChanged() protected method

Raises the redo ebabled changed event.
protected OnRedoEnabledChanged ( EventArgs e ) : void
e System.EventArgs /// General EventArgs ///
return void

OnUndoEnabledChanged() protected method

Raises the undo ebabled changed event.
protected OnUndoEnabledChanged ( EventArgs e ) : void
e System.EventArgs /// General EventArgs ///
return void

PictureStateManager() public method

Initializes a new instance of the Paint.PictureStateManager class.
public PictureStateManager ( IFilenameResolver filenameResolver, IPictureIOManager pictureIOManager, IRenderTargertHandler renderTargetHandler, ImageStateData imageStateData ) : System
filenameResolver IFilenameResolver
pictureIOManager IPictureIOManager
renderTargetHandler IRenderTargertHandler
imageStateData ImageStateData
return System

Redo() public method

Redo the most recent undo.
public Redo ( ) : void
return void

Save() public method

Save the image in its current state
public Save ( ) : void
return void

Undo() public method

Undo the most recent change
public Undo ( ) : void
return void