C# Class Paint.CanvasPlayback

Canvas playback.
Inheritance: ICanvasPlayback, IDisposable
Afficher le fichier Open project: RandolphBurt/MonoGame-iOS-SimplePaint Class Usage Examples

Méthodes publiques

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

Méthodes protégées

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

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

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

Close() public méthode

Closes the file stream.
public Close ( ) : void
Résultat void

Dispose() public méthode

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

Dispose() protected méthode

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

GetNextTouchPoints() public méthode

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

Restart() public méthode

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