class openfl.display.Tilesheet
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): 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 |
smooth | whether to smooth the tile or not |
flags | |
null | count |