|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.graphics.g2d.TextureRegion com.badlogic.gdx.graphics.g2d.Sprite com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasSprite
public static class TextureAtlas.AtlasSprite
A sprite that, if whitespace was stripped from the region when it was packed, is automatically positioned as if whitespace had not been stripped.
Constructor Summary | |
---|---|
TextureAtlas.AtlasSprite(TextureAtlas.AtlasRegion region)
|
|
TextureAtlas.AtlasSprite(TextureAtlas.AtlasSprite sprite)
|
Method Summary | |
---|---|
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. |
Methods inherited from class com.badlogic.gdx.graphics.g2d.Sprite |
---|
draw, draw, getBoundingRectangle, getColor, getRotation, getScaleX, getScaleY, getVertices, rotate, scale, scroll, set, setAlpha, setColor, setColor, setColor, setFlip, setRegion, setRotation, setScale, setScale, setU, setU2, setV, setV2, translate, translateX, translateY |
Methods inherited from class com.badlogic.gdx.graphics.g2d.TextureRegion |
---|
getRegionHeight, getRegionWidth, getRegionX, getRegionY, getTexture, getU, getU2, getV, getV2, isFlipX, isFlipY, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, split, split |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextureAtlas.AtlasSprite(TextureAtlas.AtlasRegion region)
public TextureAtlas.AtlasSprite(TextureAtlas.AtlasSprite sprite)
Method Detail |
---|
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)
.
setX
in class Sprite
public void setY(float y)
Sprite
Sprite.setBounds(float, float, float, float)
.
setY
in class Sprite
public void setBounds(float x, float y, float width, float height)
Sprite
setBounds
in class Sprite
public void setSize(float width, float height)
Sprite
Sprite.setBounds(float, float, float, float)
.
setSize
in class Sprite
public void setOrigin(float originX, float originY)
Sprite
setOrigin
in class Sprite
public void setOriginCenter()
Sprite
setOriginCenter
in class Sprite
public void flip(boolean x, boolean y)
Sprite
flip
in class Sprite
x
- perform horizontal flipy
- perform vertical flippublic void rotate90(boolean clockwise)
Sprite
Sprite.setRotation(float)
and Sprite.rotate(float)
.
rotate90
in class Sprite
public float getX()
getX
in class Sprite
public float getY()
getY
in class Sprite
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()
getWidth
in class Sprite
public float getHeight()
getHeight
in class Sprite
public float getWidthRatio()
public float getHeightRatio()
public TextureAtlas.AtlasRegion getAtlasRegion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |