C# Class Paint.CanvasPlayback

Canvas playback.
Inheritance: ICanvasPlayback, IDisposable
Mostrar archivo Open project: RandolphBurt/MonoGame-iOS-SimplePaint Class Usage Examples

Public Methods

Method Description
CanvasPlayback ( string filename ) : System

Initializes a new instance of the Paint.CanvasPlayback class.

Close ( ) : void

Closes the file stream.

Dispose ( ) : void

Releases all resource used by the Paint.CanvasPlayback object. Implement IDisposable. Do not make this method virtual. A derived class should not be able to override this method.

Call Dispose when you are finished using the Paint.CanvasPlayback. The Dispose method leaves the Paint.CanvasPlayback in an unusable state. After calling Dispose, you must release all references to the Paint.CanvasPlayback so the garbage collector can reclaim the memory that the Paint.CanvasPlayback was occupying.

GetNextTouchPoints ( int maxTouchPoints ) : ITouchPointSizeColor[]

Gets the next set of touch points.

Restart ( ) : void

Reset the input stream to the beginning ready for starting the playback all over again

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

Private Methods

Method Description
CreateTouchPoint ( byte canvasRecorderCommand ) : ITouchPointSizeColor

Creates a TouchPoint based on the data in the commandByteArray

SetBrushSize ( ) : void

Sets the size of the brush based on the data in the commandByteArray

SetColor ( ) : void

Sets the color based on the data in the commandByteArray

Method Details

CanvasPlayback() public method

Initializes a new instance of the Paint.CanvasPlayback class.
public CanvasPlayback ( string filename ) : System
filename string Name of the file containing all the playback commands
return System

Close() public method

Closes the file stream.
public Close ( ) : void
return void

Dispose() public method

Releases all resource used by the Paint.CanvasPlayback object. Implement IDisposable. Do not make this method virtual. A derived class should not be able to override this method.
Call Dispose when you are finished using the Paint.CanvasPlayback. The Dispose method leaves the Paint.CanvasPlayback in an unusable state. After calling Dispose, you must release all references to the Paint.CanvasPlayback so the garbage collector can reclaim the memory that the Paint.CanvasPlayback was occupying.
public Dispose ( ) : void
return void

Dispose() protected method

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.
protected Dispose ( bool disposing ) : void
disposing bool /// Disposing. ///
return void

GetNextTouchPoints() public method

Gets the next set of touch points.
public GetNextTouchPoints ( int maxTouchPoints ) : ITouchPointSizeColor[]
maxTouchPoints int Maximum number of touchpoints that should be retrieved
return ITouchPointSizeColor[]

Restart() public method

Reset the input stream to the beginning ready for starting the playback all over again
public Restart ( ) : void
return void