com.badlogic.gdx.scenes.scene2d.utils
Class TextureRegionDrawable
java.lang.Object
com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
- All Implemented Interfaces:
- Drawable
- Direct Known Subclasses:
- TiledDrawable
public class TextureRegionDrawable
- extends BaseDrawable
Drawable for a TextureRegion
.
- Author:
- Nathan Sweet
Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable |
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight |
TextureRegionDrawable
public TextureRegionDrawable()
- Creates an unitialized TextureRegionDrawable. The texture region must be set before use.
TextureRegionDrawable
public TextureRegionDrawable(TextureRegion region)
TextureRegionDrawable
public TextureRegionDrawable(TextureRegionDrawable drawable)
draw
public void draw(SpriteBatch batch,
float x,
float y,
float width,
float height)
- Description copied from interface:
Drawable
- Draws this drawable at the specified bounds. The drawable should be tinted with
SpriteBatch.getColor()
, possibly by
mixing its own color.
- Specified by:
draw
in interface Drawable
- Overrides:
draw
in class BaseDrawable
setRegion
public void setRegion(TextureRegion region)
getRegion
public TextureRegion getRegion()
Copyright © 2013. All Rights Reserved.