public class SpriteDrawable extends BaseDrawable implements TransformDrawable
Sprite
.Constructor and Description |
---|
SpriteDrawable()
Creates an uninitialized SpriteDrawable.
|
SpriteDrawable(Sprite sprite) |
SpriteDrawable(SpriteDrawable drawable) |
Modifier and Type | Method and Description |
---|---|
void |
draw(Batch batch,
float x,
float y,
float width,
float height)
Draws this drawable at the specified bounds.
|
void |
draw(Batch batch,
float x,
float y,
float originX,
float originY,
float width,
float height,
float scaleX,
float scaleY,
float rotation) |
Sprite |
getSprite() |
void |
setSprite(Sprite sprite) |
SpriteDrawable |
tint(Color tint)
Creates a new drawable that renders the same as this drawable tinted the specified color.
|
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getName, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setName, setRightWidth, setTopHeight, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight
public SpriteDrawable()
public SpriteDrawable(Sprite sprite)
public SpriteDrawable(SpriteDrawable drawable)
public void draw(Batch batch, float x, float y, float width, float height)
Drawable
Batch.getColor()
, possibly by mixing
its own color.draw
in interface Drawable
draw
in class BaseDrawable
public void draw(Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)
draw
in interface TransformDrawable
public void setSprite(Sprite sprite)
public Sprite getSprite()
public SpriteDrawable tint(Color tint)
Copyright © 2015. All rights reserved.