public class LibgdxTextureRegionWrapper
extends com.badlogic.gdx.graphics.g2d.TextureRegion
Constructor and Description |
---|
LibgdxTextureRegionWrapper()
Constructs a region with no texture and no coordinates defined.
|
LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.Texture texture)
Constructs a region the size of the specified texture.
|
LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion atlasRegion)
Constructs a region from an
TextureAtlas.AtlasRegion |
LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.Texture texture,
float u,
float v,
float u2,
float v2) |
LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.Texture texture,
int width,
int height) |
LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.Texture texture,
int x,
int y,
int width,
int height) |
LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.g2d.TextureRegion region)
Constructs a region with the same texture and coordinates of the specified region.
|
LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.g2d.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 |
void |
setRegionHeight(int height) |
flip, getRegionHeight, getRegionWidth, getRegionX, getTexture, getU, getU2, getV, getV2, isFlipX, scroll, setRegion, setRegion, setRegion, setRegion, setRegion, setRegionWidth, setRegionX, setRegionY, setTexture, setU, setU2, setV, setV2, split, split
public LibgdxTextureRegionWrapper()
public LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.Texture texture)
public LibgdxTextureRegionWrapper(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 LibgdxTextureRegionWrapper(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 LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.Texture texture, float u, float v, float u2, float v2)
public LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.g2d.TextureRegion region)
public LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.g2d.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 LibgdxTextureRegionWrapper(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion atlasRegion)
TextureAtlas.AtlasRegion
atlasRegion
- public boolean isFlipY()
isFlipY
in class com.badlogic.gdx.graphics.g2d.TextureRegion
public int getRegionY()
getRegionY
in class com.badlogic.gdx.graphics.g2d.TextureRegion
public 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 verticallypublic void setRegionHeight(int height)
setRegionHeight
in class com.badlogic.gdx.graphics.g2d.TextureRegion