Constructor

new(image:BitmapData)

Creates new TileSheet Object

Parameters:

image

a bitmap data to create tiles from

Methods

@:value({ centerPoint : null })addTileRect(rectangle:Rectangle, ?centerPoint:Point):Int

Adds an single tile to this TileSheet

Parameters:

rectangle

a rectangle defining the dimensions and positioning of a new tile

centerPoint

if set, will act as the translation point of the tile, default: top-left corner

Returns:

an Int representing the id of a single tile rect

@:value({ count : -1, flags : 0, smooth : false })drawTiles(graphics:Graphics, tileData:Array<Float>, smooth:Bool = false, flags:Int = 0, count:Int = -1):Void

Draws tiles to a give Graphic Object

Parameters:

graphics

the "Graphics" object to draw tiles to

tileData

an Array(3) denoting the X position, Y position, and tile to render repsectively

smooth

whether to smooth the tile or not

flags
null

count

inlinegetTileCenter(index:Int):Point

inlinegetTileUVs(index:Int):Rectangle

Static variables

@:value(0x0008)staticinlineread onlyTILE_ALPHA:Int = 0x0008

@:value(0x00010000)staticinlineread onlyTILE_BLEND_ADD:Int = 0x00010000

@:value(0x00100000)staticinlineread onlyTILE_BLEND_DARKEN:Int = 0x00100000

@:value(0x01000000)staticinlineread onlyTILE_BLEND_DIFFERENCE:Int = 0x01000000

@:value(0x00800000)staticinlineread onlyTILE_BLEND_HARDLIGHT:Int = 0x00800000

@:value(0x02000000)staticinlineread onlyTILE_BLEND_INVERT:Int = 0x02000000

@:value(0x00200000)staticinlineread onlyTILE_BLEND_LIGHTEN:Int = 0x00200000

@:value(0x00020000)staticinlineread onlyTILE_BLEND_MULTIPLY:Int = 0x00020000

@:value(0x00000000)staticinlineread onlyTILE_BLEND_NORMAL:Int = 0x00000000

@:value(0x00400000)staticinlineread onlyTILE_BLEND_OVERLAY:Int = 0x00400000

@:value(0x00040000)staticinlineread onlyTILE_BLEND_SCREEN:Int = 0x00040000

@:value(0x00080000)staticinlineread onlyTILE_BLEND_SUBTRACT:Int = 0x00080000

@:value(0x0040)staticinlineread onlyTILE_ORIGIN:Int = 0x0040

@:value(0x0020)staticinlineread onlyTILE_RECT:Int = 0x0020

@:value(0x0004)staticinlineread onlyTILE_RGB:Int = 0x0004

@:value(0x0002)staticinlineread onlyTILE_ROTATION:Int = 0x0002

@:value(0x0001)staticinlineread onlyTILE_SCALE:Int = 0x0001

@:value(0x0010)staticinlineread onlyTILE_TRANS_2x2:Int = 0x0010

@:value(0x0080)staticinlineread onlyTILE_TRANS_COLOR:Int = 0x0080