public static class TextureAtlas.AtlasSprite extends Sprite
| Constructor and Description |
|---|
AtlasSprite(TextureAtlas.AtlasRegion region) |
AtlasSprite(TextureAtlas.AtlasSprite sprite) |
| Modifier and Type | Method and Description |
|---|---|
void |
flip(boolean x,
boolean y)
boolean parameters x,y are not setting a state, but performing a flip
|
TextureAtlas.AtlasRegion |
getAtlasRegion() |
float |
getHeight() |
float |
getHeightRatio() |
float |
getOriginX()
The origin influences
Sprite.setPosition(float, float), Sprite.setRotation(float) and the expansion direction of scaling
Sprite.setScale(float, float) |
float |
getOriginY()
The origin influences
Sprite.setPosition(float, float), Sprite.setRotation(float) and the expansion direction of scaling
Sprite.setScale(float, float) |
float |
getWidth() |
float |
getWidthRatio() |
float |
getX() |
float |
getY() |
void |
rotate90(boolean clockwise)
Rotates this sprite 90 degrees in-place by rotating the texture coordinates.
|
void |
setBounds(float x,
float y,
float width,
float height)
Sets the position and size of the sprite when drawn, before scaling and rotation are applied.
|
void |
setOrigin(float originX,
float originY)
Sets the origin in relation to the sprite's position for scaling and rotation.
|
void |
setOriginCenter()
Place origin in the center of the sprite
|
void |
setPosition(float x,
float y)
Sets the position where the sprite will be drawn.
|
void |
setSize(float width,
float height)
Sets the size of the sprite when drawn, before scaling and rotation are applied.
|
void |
setX(float x)
Sets the x position where the sprite will be drawn.
|
void |
setY(float y)
Sets the y position where the sprite will be drawn.
|
java.lang.String |
toString() |
draw, draw, getBoundingRectangle, getColor, getRotation, getScaleX, getScaleY, getVertices, rotate, scale, scroll, set, setAlpha, setCenter, setCenterX, setCenterY, setColor, setColor, setColor, setFlip, setRegion, setRotation, setScale, setScale, setU, setU2, setV, setV2, translate, translateX, translateYgetRegionHeight, getRegionWidth, getRegionX, getRegionY, getTexture, getU, getU2, getV, getV2, isFlipX, isFlipY, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, split, splitpublic AtlasSprite(TextureAtlas.AtlasRegion region)
public AtlasSprite(TextureAtlas.AtlasSprite sprite)
public void setPosition(float x,
float y)
SpriteSprite.setBounds(float, float, float, float).setPosition in class Spritepublic void setX(float x)
SpriteSprite.setBounds(float, float, float, float).public void setY(float y)
SpriteSprite.setBounds(float, float, float, float).public void setBounds(float x,
float y,
float width,
float height)
Spritepublic void setSize(float width,
float height)
SpriteSprite.setBounds(float, float, float, float).public void setOrigin(float originX,
float originY)
Spritepublic void setOriginCenter()
SpritesetOriginCenter in class Spritepublic void flip(boolean x,
boolean y)
Spritepublic void rotate90(boolean clockwise)
SpriteSprite.setRotation(float) and Sprite.rotate(float).public float getOriginX()
SpriteSprite.setPosition(float, float), Sprite.setRotation(float) and the expansion direction of scaling
Sprite.setScale(float, float)getOriginX in class Spritepublic float getOriginY()
SpriteSprite.setPosition(float, float), Sprite.setRotation(float) and the expansion direction of scaling
Sprite.setScale(float, float)getOriginY in class Spritepublic float getWidth()
public float getHeight()
public float getWidthRatio()
public float getHeightRatio()
public TextureAtlas.AtlasRegion getAtlasRegion()
public java.lang.String toString()
toString in class java.lang.Object