C# Class Paint.PictureStateManager

Picture State manager - undo, redo, save.
Inheritance: IPictureStateManager
Afficher le fichier Open project: RandolphBurt/MonoGame-iOS-SimplePaint

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
OnRedoEnabledChanged ( EventArgs e ) : void

Raises the redo ebabled changed event.

OnUndoEnabledChanged ( EventArgs e ) : void

Raises the undo ebabled changed event.

Private Methods

Méthode 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 méthode

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
Résultat void

InitialisePictureState() public méthode

Initialise the picture state manager
public InitialisePictureState ( bool newImage ) : void
newImage bool
Résultat void

OnRedoEnabledChanged() protected méthode

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

OnUndoEnabledChanged() protected méthode

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

PictureStateManager() public méthode

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
Résultat System

Redo() public méthode

Redo the most recent undo.
public Redo ( ) : void
Résultat void

Save() public méthode

Save the image in its current state
public Save ( ) : void
Résultat void

Undo() public méthode

Undo the most recent change
public Undo ( ) : void
Résultat void