public static class TextureAtlas.AtlasSprite extends Sprite
Constructor and Description |
---|
TextureAtlas.AtlasSprite(TextureAtlas.AtlasRegion region) |
TextureAtlas.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.
|
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, translateY
getRegionHeight, getRegionWidth, getRegionX, getRegionY, getTexture, getU, getU2, getV, getV2, isFlipX, isFlipY, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, split, split
public TextureAtlas.AtlasSprite(TextureAtlas.AtlasRegion region)
public TextureAtlas.AtlasSprite(TextureAtlas.AtlasSprite sprite)
public void setPosition(float x, float y)
Sprite
Sprite.setBounds(float, float, float, float)
.setPosition
in class Sprite
public void setX(float x)
Sprite
Sprite.setBounds(float, float, float, float)
.public void setY(float y)
Sprite
Sprite.setBounds(float, float, float, float)
.public void setBounds(float x, float y, float width, float height)
Sprite
public void setSize(float width, float height)
Sprite
Sprite.setBounds(float, float, float, float)
.public void setOrigin(float originX, float originY)
Sprite
public void setOriginCenter()
Sprite
setOriginCenter
in class Sprite
public void flip(boolean x, boolean y)
Sprite
public void rotate90(boolean clockwise)
Sprite
Sprite.setRotation(float)
and Sprite.rotate(float)
.public float getOriginX()
Sprite
Sprite.setPosition(float, float)
, Sprite.setRotation(float)
and the expansion direction of scaling
Sprite.setScale(float, float)
getOriginX
in class Sprite
public float getOriginY()
Sprite
Sprite.setPosition(float, float)
, Sprite.setRotation(float)
and the expansion direction of scaling
Sprite.setScale(float, float)
getOriginY
in class Sprite
public float getWidth()
public float getHeight()
public float getWidthRatio()
public float getHeightRatio()
public TextureAtlas.AtlasRegion getAtlasRegion()
Copyright © 2014. All rights reserved.