public static class TextureAtlas.AtlasRegion extends TextureRegion
Modifier and Type | Field and Description |
---|---|
int |
degrees
The degrees the region has been rotated, counter clockwise between 0 and 359.
|
int |
index
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. |
String |
name
The name of the original image file, without the file's extension.
If the name ends with an underscore followed by only numbers, that part is excluded: underscores denote special instructions to the texture packer. |
float |
offsetX
The offset from the left of the original image to the left of the packed image, after whitespace was removed for packing.
|
float |
offsetY
The offset from the bottom of the original image to the bottom of the packed image, after whitespace was removed for
packing.
|
int |
originalHeight
The height of the image, before whitespace was removed for packing.
|
int |
originalWidth
The width of the image, before whitespace was removed and rotation was applied for packing.
|
int |
packedHeight
The height of the image, after whitespace was removed for packing.
|
int |
packedWidth
The width of the image, after whitespace was removed for packing.
|
int[] |
pads
The ninepatch pads, or null if not a ninepatch or the has no padding.
|
boolean |
rotate
If true, the region has been rotated 90 degrees counter clockwise.
|
int[] |
splits
The ninepatch splits, or null if not a ninepatch.
|
Constructor and Description |
---|
AtlasRegion(TextureAtlas.AtlasRegion region) |
AtlasRegion(Texture texture,
int x,
int y,
int width,
int height) |
AtlasRegion(TextureRegion region) |
Modifier and Type | Method and Description |
---|---|
void |
flip(boolean x,
boolean y) |
float |
getRotatedPackedHeight()
Returns the packed height considering the
rotate value, if it is true then it returns the packedWidth,
otherwise it returns the packedHeight. |
float |
getRotatedPackedWidth()
Returns the packed width considering the
rotate value, if it is true then it returns the packedHeight,
otherwise it returns the packedWidth. |
String |
toString() |
getRegionHeight, getRegionWidth, getRegionX, getRegionY, getTexture, getU, getU2, getV, getV2, isFlipX, isFlipY, scroll, setRegion, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, setU, setU2, setV, setV2, split, split
public int index
TextureAtlas.findRegions(String)
public String name
public float offsetX
public float offsetY
public int packedWidth
public int packedHeight
public int originalWidth
public int originalHeight
public boolean rotate
public int degrees
public int[] splits
public int[] pads
public AtlasRegion(Texture texture, int x, int y, int width, int height)
public AtlasRegion(TextureAtlas.AtlasRegion region)
public AtlasRegion(TextureRegion region)
public void flip(boolean x, boolean y)
flip
in class TextureRegion
public float getRotatedPackedWidth()
rotate
value, if it is true then it returns the packedHeight,
otherwise it returns the packedWidth.public float getRotatedPackedHeight()
rotate
value, if it is true then it returns the packedWidth,
otherwise it returns the packedHeight.Copyright © 2020. All rights reserved.