class spinehx.atlas.AtlasRegion extends TextureRegion
import spinehx.atlas.TextureAtlas;
Available on all platforms
Describes the region of a packed image and provides information about the original image before it was packed.
Class Fields
Instance Fields
The number at the end of the original image file name, or -1 if none.
*
* When sprites are packed, if the original file name ends with a number, it is stored as the index and is not considered as
* part of the sprite's name. This is useful for keeping animation frames in order.
* @see TextureAtlas#findRegions(String)
The name of the original image file, up to the first underscore. Underscores denote special instructions to the texture * packer.
The offset from the left of the original image to the left of the packed image, after whitespace was removed for packing.
The offset from the bottom of the original image to the bottom of the packed image, after whitespace was removed for * packing.
var originalWidth:Int
The width of the image, before whitespace was removed and rotation was applied for packing.
The ninepatch pads, or null if not a ninepatch or the has no padding. Has 4 elements: left, right, top, bottom.
function flip(x:Bool, y:Bool):Void
Flips the region, adjusting the offset so the image appears to be flip as if no whitespace has been removed for packing.
function getRotatedPackedHeight():Float
Returns the packed height considering the rotate value, if it is true then it returns the packedWidth, otherwise it * returns the packedHeight.
function getRotatedPackedWidth():Float
Returns the packed width considering the rotate value, if it is true then it returns the packedHeight, otherwise it * returns the packedWidth.