struct Tsh::Sprite

Overview

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

Defined in:

plaything.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(sprite : Array(Array(Int))) #

Instance Method Detail

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

Gets a coordinate pixel in the sprite


def data : Array(Array(UInt32)) #

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


def data=(data : Array(Array(UInt32))) #

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


def height : Int32 #

The height of the sprite


def width : Int32 #

The size of the widest line in the sprite