public class TextureRegion
extends com.badlogic.gdx.graphics.g2d.TextureRegion
| Constructor and Description |
|---|
TextureRegion()
Constructs a region with no texture and no coordinates defined.
|
TextureRegion(com.badlogic.gdx.graphics.Texture texture)
Constructs a region the size of the specified texture.
|
TextureRegion(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion atlasRegion)
Constructs a region from an
TextureAtlas.AtlasRegion |
TextureRegion(com.badlogic.gdx.graphics.Texture texture,
float u,
float v,
float u2,
float v2) |
TextureRegion(com.badlogic.gdx.graphics.Texture texture,
int width,
int height) |
TextureRegion(com.badlogic.gdx.graphics.Texture texture,
int x,
int y,
int width,
int height) |
TextureRegion(TextureRegion region)
Constructs a region with the same texture and coordinates of the specified region.
|
TextureRegion(TextureRegion region,
int x,
int y,
int width,
int height)
Constructs a region with the same texture as the specified region and sets the coordinates relative to the specified region.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getRegionY() |
boolean |
isFlipY() |
void |
setFlip(boolean flipX,
boolean flipY)
Sets if the
TextureRegion is flipped |
void |
setFlipX(boolean flipX)
Sets if the
TextureRegion is flipped horizontally |
void |
setFlipY(boolean flipY)
Sets if the
TextureRegion is flipped vertically |
flip, getRegionHeight, getRegionWidth, getRegionX, getTexture, getU, getU2, getV, getV2, isFlipX, scroll, setRegion, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, setU, setU2, setV, setV2, split, splitpublic TextureRegion()
public TextureRegion(com.badlogic.gdx.graphics.Texture texture)
public TextureRegion(com.badlogic.gdx.graphics.Texture texture,
int width,
int height)
width - The width of the texture region. May be negative to flip the sprite when drawn.height - The height of the texture region. May be negative to flip the sprite when drawn.public TextureRegion(com.badlogic.gdx.graphics.Texture texture,
int x,
int y,
int width,
int height)
width - The width of the texture region. May be negative to flip the sprite when drawn.height - The height of the texture region. May be negative to flip the sprite when drawn.public TextureRegion(com.badlogic.gdx.graphics.Texture texture,
float u,
float v,
float u2,
float v2)
public TextureRegion(TextureRegion region)
public TextureRegion(TextureRegion region, int x, int y, int width, int height)
width - The width of the texture region. May be negative to flip the sprite when drawn.height - The height of the texture region. May be negative to flip the sprite when drawn.public TextureRegion(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion atlasRegion)
TextureAtlas.AtlasRegionatlasRegion - public boolean isFlipY()
isFlipY in class com.badlogic.gdx.graphics.g2d.TextureRegionpublic int getRegionY()
getRegionY in class com.badlogic.gdx.graphics.g2d.TextureRegionpublic void setFlip(boolean flipX,
boolean flipY)
TextureRegion is flippedflipX - True if the region is flipped horizontallyflipY - True if the region is flipped verticallypublic void setFlipX(boolean flipX)
TextureRegion is flipped horizontallyflipX - True if the region is flipped horizontallypublic void setFlipY(boolean flipY)
TextureRegion is flipped verticallyflipY - True if the region is flipped vertically