class Crame::Texture

Overview

A Texture is a Drawable element that represent an image.

Currently, only JPEG and PNG images are tested and proven to work. But theorically, all image format should do the trick.

Included Modules

Defined in:

crame/texture.cr

Constructors

Instance methods inherited from module Crame::Drawable

draw(position : Vector2, angle : Float = 0.0, origin : Vector2 = Vector2.new(0, 0), scale : Vector2 = Vector2.new(1, 1), color : Color = Color.new(1, 1, 1, 1)) draw, finalize finalize, size : Vector2 size

Constructor Detail

def self.new(path : String | Path) #

Creates a new Texture given its path.