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
aseFileAsepriteFileThe aseprite file instance.
deviceGraphicsDeviceThe graphics device used to create graphical resources.
frameIndexintThe index of the frame in the aseprite file to create the sprite from.
optionsProcessorOptionsThe 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.