C# Class Paint.ImageStateData

Image state data.
Mostrar archivo Open project: RandolphBurt/MonoGame-iOS-SimplePaint Class Usage Examples

Public Methods

Method Description
DecrementSavePoint ( ) : void

Decrements the save point by one - but taking into account wrapping past zero

ImageStateData ( int width, int height, int maxUndoRedoCount, int firstSavePoint, int lastSavePoint, int currentSavePoint ) : System

Initializes a new instance of the Paint.ImageStateData class.

IncrementSavePoint ( ) : void

Increments the save point by one - but taking into account wrapping back to zero

ResetLastSavePoint ( ) : void

Resets the last save point to be the same as the current save point e.g. if user presses undo and then alters the image then we need to throw away future redo images - i.e. reset the lastSavePoint that we can go back to as the current save point

Method Details

DecrementSavePoint() public method

Decrements the save point by one - but taking into account wrapping past zero
public DecrementSavePoint ( ) : void
return void

ImageStateData() public method

Initializes a new instance of the Paint.ImageStateData class.
public ImageStateData ( int width, int height, int maxUndoRedoCount, int firstSavePoint, int lastSavePoint, int currentSavePoint ) : System
width int Width of the image
height int Height of the image
maxUndoRedoCount int How big is the undo/redo list
firstSavePoint int Which save point is the first one - ie. what is the furthest we can go back /// if we continually undo
lastSavePoint int Which save point is the last one - ie. indicates how many times we can press /// redo
currentSavePoint int The current save point
return System

IncrementSavePoint() public method

Increments the save point by one - but taking into account wrapping back to zero
public IncrementSavePoint ( ) : void
return void

ResetLastSavePoint() public method

Resets the last save point to be the same as the current save point e.g. if user presses undo and then alters the image then we need to throw away future redo images - i.e. reset the lastSavePoint that we can go back to as the current save point
public ResetLastSavePoint ( ) : void
return void