| Modifier and Type | Field and Description |
|---|---|
| private Rectangle | |
| private final Color | |
| private boolean | |
| private float | |
| private float | |
| private float | |
| pack-priv PolygonRegion | |
| private float | |
| private float | |
| private float | |
| private float[] | |
| private float | |
| private float | |
| private float |
| Access | Constructor and Description |
|---|---|
| public | |
| public | PolygonSprite(PolygonSprite sprite)
Creates a sprite that is a copy in every way of the specified sprite. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public Rectangle | Returns: the bounding RectangleReturns the bounding axis aligned |
| public Color | |
| public float | |
| public float | |
| public float | |
| public Color | |
| public PolygonRegion | |
| public float | |
| public float | |
| public float | |
| public float[] | |
| public float | |
| public float | |
| public float | |
| public void | |
| public void | |
| public void | |
| public 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. |
| public void | |
| public void | |
| public void | setOrigin(float originX, float originY)
Sets the origin in relation to the sprite's position for scaling and rotation. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setSize(float width, float height)
Sets the size of the sprite when drawn, before scaling and rotation are applied. |
| public void | |
| public void | |
| public void | translate(float xAmount, float yAmount)
Sets the position relative to the current position where the sprite will be drawn. |
| public void | translateX(float xAmount)
Sets the x position relative to the current position where the sprite will be drawn. |
| public void | translateY(float yAmount)
Sets the y position relative to the current position where the sprite will be drawn. |
| bounds | back to summary |
|---|---|
| private Rectangle bounds | |
| color | back to summary |
|---|---|
| private final Color color | |
| dirty | back to summary |
|---|---|
| private boolean dirty | |
| height | back to summary |
|---|---|
| private float height | |
| originX | back to summary |
|---|---|
| private float originX | |
| originY | back to summary |
|---|---|
| private float originY | |
| region | back to summary |
|---|---|
| pack-priv PolygonRegion region | |
| rotation | back to summary |
|---|---|
| private float rotation | |
| scaleX | back to summary |
|---|---|
| private float scaleX | |
| scaleY | back to summary |
|---|---|
| private float scaleY | |
| vertices | back to summary |
|---|---|
| private float[] vertices | |
| width | back to summary |
|---|---|
| private float width | |
| x | back to summary |
|---|---|
| private float x | |
| y | back to summary |
|---|---|
| private float y | |
| PolygonSprite | back to summary |
|---|---|
| public PolygonSprite(PolygonRegion region) | |
| PolygonSprite | back to summary |
|---|---|
| public PolygonSprite(PolygonSprite sprite) Creates a sprite that is a copy in every way of the specified sprite. | |
| draw | back to summary |
|---|---|
| public void draw(PolygonSpriteBatch spriteBatch) | |
| draw | back to summary |
|---|---|
| public void draw(PolygonSpriteBatch spriteBatch, float alphaModulation) | |
| getBoundingRectangle | back to summary |
|---|---|
| public Rectangle getBoundingRectangle() Returns the bounding axis aligned
| |
| getColor | back to summary |
|---|---|
| public Color getColor() Returns the color of this sprite. Modifying the returned color will have unexpected effects unless | |
| getHeight | back to summary |
|---|---|
| public float getHeight() | |
| getOriginX | back to summary |
|---|---|
| public float getOriginX() | |
| getOriginY | back to summary |
|---|---|
| public float getOriginY() | |
| getPackedColor | back to summary |
|---|---|
| public Color getPackedColor() Returns the actual color used in the vertices of this sprite. Modifying the returned color will have unexpected effects
unless | |
| getRegion | back to summary |
|---|---|
| public PolygonRegion getRegion() | |
| getRotation | back to summary |
|---|---|
| public float getRotation() | |
| getScaleX | back to summary |
|---|---|
| public float getScaleX() | |
| getScaleY | back to summary |
|---|---|
| public float getScaleY() | |
| getVertices | back to summary |
|---|---|
| public float[] getVertices() Returns the packed vertices, colors, and texture coordinates for this sprite. | |
| getWidth | back to summary |
|---|---|
| public float getWidth() | |
| getX | back to summary |
|---|---|
| public float getX() | |
| getY | back to summary |
|---|---|
| public float getY() | |
| rotate | back to summary |
|---|---|
| public void rotate(float degrees) Sets the sprite's rotation relative to the current rotation. | |
| scale | back to summary |
|---|---|
| public void scale(float amount) Sets the sprite's scale relative to the current scale. | |
| set | back to summary |
|---|---|
| public void set(PolygonSprite sprite) | |
| setBounds | back to summary |
|---|---|
| public 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. If origin, rotation, or scale are changed, it is slightly more efficient to set the bounds after those operations. | |
| setColor | back to summary |
|---|---|
| public void setColor(Color tint) | |
| setColor | back to summary |
|---|---|
| public void setColor(float r, float g, float b, float a) | |
| setOrigin | back to summary |
|---|---|
| public void setOrigin(float originX, float originY) Sets the origin in relation to the sprite's position for scaling and rotation. | |
| setPosition | back to summary |
|---|---|
| public void setPosition(float x, float y) Sets the position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient
to set the position after those operations. If both position and size are to be changed, it is better to use
| |
| setRegion | back to summary |
|---|---|
| public void setRegion(PolygonRegion region) | |
| setRotation | back to summary |
|---|---|
| public void setRotation(float degrees) | |
| setScale | back to summary |
|---|---|
| public void setScale(float scaleXY) | |
| setScale | back to summary |
|---|---|
| public void setScale(float scaleX, float scaleY) | |
| setSize | back to summary |
|---|---|
| public void setSize(float width, float height) Sets the size of the sprite when drawn, before scaling and rotation are applied. If origin, rotation, or scale are changed,
it is slightly more efficient to set the size after those operations. If both position and size are to be changed, it is
better to use | |
| setX | back to summary |
|---|---|
| public void setX(float x) Sets the x position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more
efficient to set the position after those operations. If both position and size are to be changed, it is better to use
| |
| setY | back to summary |
|---|---|
| public void setY(float y) Sets the y position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more
efficient to set the position after those operations. If both position and size are to be changed, it is better to use
| |
| translate | back to summary |
|---|---|
| public void translate(float xAmount, float yAmount) Sets the position relative to the current position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to translate after those operations. | |
| translateX | back to summary |
|---|---|
| public void translateX(float xAmount) Sets the x position relative to the current position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to translate after those operations. | |
| translateY | back to summary |
|---|---|
| public void translateY(float yAmount) Sets the y position relative to the current position where the sprite will be drawn. If origin, rotation, or scale are changed, it is slightly more efficient to translate after those operations. | |