class openfl.display.Tilesheet

Class Fields

static var TILE_ALPHA:Int

static var TILE_BLEND_ADD:Int

static var TILE_ORIGIN:Int

static var TILE_RECT:Int

static var TILE_RGB:Int

static var TILE_ROTATION:Int

static var TILE_SCALE:Int

static var TILE_TRANS_2x2:Int

Instance Fields

function new(image:BitmapData): Void

Creates new TileSheet Object

image

a bitmap data to create tiles from

function addTileRect(rectangle:Rectangle, ?centerPoint:Point): Int

Adds an single tile to this TileSheet

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

function drawTiles(graphics:Graphics, tileData:Array<Float>, ?smooth:Bool, ?flags:Int, ?count:Int): Void

Draws tiles to a give Graphic Object

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

function getTileCenter(index:Int): Point

function getTileRect(index:Int): Rectangle

function getTileUVs(index:Int): Rectangle