struct

Tsh::Sprite

Inherits Struct < Value < Object

A collection of indices to Tsh::Color with a width and a height

Constructors

new(sprite : Array(Array(Int)))
Source

Instance methods

[](x : Int, y : Int) : UInt32

Gets a coordinate pixel in the sprite

Source
data

The pixel data of the sprite. Each number is in index to Tsh.colors

Source
data=(data : Array(Array(UInt32)))

The pixel data of the sprite. Each number is in index to Tsh.colors

Source
height

The height of the sprite

Source
width

The size of the widest line in the sprite

Source