struct

CrImage::Util::SpriteSheet

Inherits Struct / Value / Object

Result of sprite sheet generation.

Contains the combined sprite sheet image and metadata for each sprite. Provides convenient access to sprite positions and dimensions.

Constructors

new(image : CrImage::RGBA, sprites : Array(CrImage::Util::SpriteInfo))
Source

Instance methods

[](index : Int32) : SpriteInfo

Gets sprite info by index.

Returns: SpriteInfo for the specified sprite

Source
image
Source
image=(image : RGBA)
Source
size

Returns the total number of sprites in the sheet.

Source
sprites
Source
sprites=(sprites : Array(SpriteInfo))
Source