Texit.Image

An image, backed by an SDL surface

mixintemplate Texit(string charmap, int charSize, float scale, int worldWidth, int worldHeight, int width, int height, string title)
class Image {}

Constructors

this
this(SDL_Surface* surf)

Creates from an SDL surface. Note that you should only handle the texture thru this class after creating it (since the texture is deleted when the GC frees the instance)

Destructor

~this
~this()

Frees the texture

Members

Properties

height
int height [@property getter]

Gets height

pixels
Color[] pixels [@property getter]

Gets the pixels of this image

width
int width [@property getter]

Gets width

Static functions

load
Image load(string file)

Loads an image from a file

Variables

surface
SDL_Surface* surface;

The surface backing this image

texture
SDL_Texture* texture;

A texture backing this image

Meta