com.badlogic.gdx.scenes.scene2d.utils
Class TextureRegionDrawable

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
      extended by 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

Constructor Summary
TextureRegionDrawable()
          Creates an unitialized TextureRegionDrawable.
TextureRegionDrawable(TextureRegion region)
           
TextureRegionDrawable(TextureRegionDrawable drawable)
           
 
Method Summary
 void draw(SpriteBatch batch, float x, float y, float width, float height)
          Draws this drawable at the specified bounds.
 TextureRegion getRegion()
           
 void setRegion(TextureRegion region)
           
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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.