class

IconRenderer::Assets::Sprite

Inherits Reference < Object

Represents a sprite along with its texture data in a spritesheet.

Constructors

new(offset : Tuple(Int32, Int32), rect : Tuple(Tuple(Int32, Int32), Tuple(Int32, Int32)), rotated : Bool, size : Tuple(Int32, Int32), source_size : Tuple(Int32, Int32))
Source
new(obj : PList::Value)

Shorthand for initializing a sprite with its .plist representation.

Source

Instance methods

offset

Whenever rendering the sprite, offset it by this much

Source
rect

{left, top}, {width, height}. Controls the cropping

Source
rotated

Whether the texture needs to be counter-rotated 90deg counter-clockwise

Source
size
Source
source_size

Difference between this and size is unknown as of now

Source