Table of Contents

Method GetRegion

Namespace
MonoGame.Aseprite
Assembly
MonoGame.Aseprite.dll

GetRegion(int)

Gets the TextureRegion element at the specified index in this TextureAtlas.

public TextureRegion GetRegion(int index)

Parameters

index int

The index of the TextureRegion element to locate.

Returns

TextureRegion

The TextureRegion element that was located.

Exceptions

ArgumentOutOfRangeException

Thrown if the specified index is less than zero or is greater than or equal to the total number of TextureRegion elements in this TextureAtlas.

GetRegion(string)

Gets the TextureRegion element with the specified name in this TextureAtlas.

public TextureRegion GetRegion(string name)

Parameters

name string

The name of the TextureRegion element to locate.

Returns

TextureRegion

The TextureRegion element that was located.

Exceptions

KeyNotFoundException

Thrown if this TextureAtlas does not contain a TextureRegion element with the specified name.