struct Glint::Texture

Defined in:

glint/texture.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(texture : Raylib::Texture2D) #

Creates a texture from a Raylib::Texture2D.


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

Creates a texture from an external resource.


[View source]

Class Method Detail

def self.load(filename : String) #

Loads an external texture resource.


[View source]

Instance Method Detail

def draw(position, pivot, rotation, tint) #

Draw a texture


[View source]
def extents #

Returns the Texture's extents.


[View source]
def to_unsafe : Raylib::Texture2D #

Returns the Texture in a C-compatible format, i.e. as Raylib::Texture.

This allows for transparent interoperability with the Raylib library.


[View source]