Fork me on GitHub
View source

package com.haxepunk.graphics

class TiledImage


extends Image

Special Image object that can display blocks of tiles.

Constructor

View source

new (texture : ImageType, width : Int = 0, height : Int = 0, ?clipRect : Rectangle) : Void

Constructs the TiledImage.


Parameters:
texture   

Source texture.

width   

The width of the image (the texture will be drawn to fill this area).

height   

The height of the image (the texture will be drawn to fill this area).

clipRect   

An optional area of the source texture to use (eg. a tile from a tileset).

Variables

offsetX : Float

The x-offset of the texture.

offsetY : Float

The y-offset of the texture.

Functions

View source

setOffset (x : Float, y : Float) : Void

Sets the texture offset.


Parameters:
x   

The x-offset.

y   

The y-offset.