Method CreateSprite
CreateSprite(AsepriteFile, GraphicsDevice, int, ProcessorOptions?)
Creates a new Sprite from the specified frame index of the provided aseprite file instance.
public static Sprite CreateSprite(this AsepriteFile aseFile, GraphicsDevice device, int frameIndex, ProcessorOptions? options = null)Parameters
- aseFileAsepriteFile
- The aseprite file instance. 
- deviceGraphicsDevice
- The graphics device used to create graphical resources. 
- frameIndexint
- The index of the frame in the aseprite file to create the sprite from. 
- optionsProcessorOptions
- The options to use when processing the sprite. 
Returns
Exceptions
- ArgumentNullException
- Thrown if the - aseFileparameter is null.- -or- - Thrown if the - deviceparameter is null.
- ArgumentOutOfRangeException
- Thrown if - frameIndexis less than zero or greater than or equal to the total number of frames in the aseprite file.