SpriteBatcherAtlasExtensions Class

Extension methods for SpriteBatcher to work seamlessly with texture atlases. Import this namespace to enable convenient atlas drawing methods.

public static class SpriteBatcherAtlasExtensions

Inheritance System.Object → SpriteBatcherAtlasExtensions

Methods
DrawAtlasRegion(this SpriteBatcher, AtlasRegion, Vector2, Nullable<Vector2>, float, Nullable<Vector2>, Nullable<Color>, byte, SpriteFlip) Draws a sprite from a texture atlas. Automatically uses the correct source rectangle from the atlas region.
DrawFromAtlas(this SpriteBatcher, ITextureAtlas, string, Vector2, Nullable<Vector2>, float, Nullable<Vector2>, Nullable<Color>, byte, SpriteFlip) Draws a sprite from a texture atlas by name. Convenience method that looks up the region and draws it in one call.
DrawFromAtlas(this SpriteBatcher, ITextureAtlasCollection, string, Vector2, Nullable<Vector2>, float, Nullable<Vector2>, Nullable<Color>, byte, SpriteFlip) Draws a sprite from a texture atlas collection by name. Convenience method that looks up the region automatically across all atlases.