class Crono::Image

Defined in:

crono/image.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(src : String, dimentions : TSize) #

[View source]
def self.new(src : String) #

[View source]

Class Method Detail

def self.load_tiles(src : String, dimentions : TSize) #

Returns Array(NamedTuple) The total number of sprites would be (img.full_width / dimentions[0]) * (img.full_height / dimentions[1])


[View source]

Instance Method Detail

def dimentions : {Int32, Int32} #

[View source]
def dimentions=(dimentions : Tuple(Int32, Int32)) #

[View source]
def full_height #

returns the full height of the image


[View source]
def full_width #

returns the full width of the image


[View source]
def height #

returns the height you want


[View source]
def sdl : SDL::Texture #

TODO find a better name for this proxy method


[View source]
def src : String #

[View source]
def src=(src : String) #

[View source]
def width #

returns the width you want


[View source]