class openfl.display.Tilesheet
Available on all platforms
Class Fields
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 = null):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 = false, ?flags:Int = 0, ?count:Int = -1):Void
Draws tiles to a give Graphic Object
graphics | the "Graphics" object to draw tiles to |
tileData | an Array |
smooth | whether to smooth the tile or not |
flags | |
null | count |