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

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
      extended by com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
          extended by com.badlogic.gdx.scenes.scene2d.utils.TiledDrawable
All Implemented Interfaces:
Drawable

public class TiledDrawable
extends TextureRegionDrawable

Draws a TextureRegion repeatedly to fill the area, instead of stretching it.

Author:
Nathan Sweet

Constructor Summary
TiledDrawable()
           
TiledDrawable(TextureRegion region)
           
TiledDrawable(TextureRegionDrawable drawable)
           
 
Method Summary
 void draw(SpriteBatch batch, float x, float y, float width, float height)
          Draws this drawable at the specified bounds.
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
getRegion, setRegion
 
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

TiledDrawable

public TiledDrawable()

TiledDrawable

public TiledDrawable(TextureRegion region)

TiledDrawable

public TiledDrawable(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 TextureRegionDrawable


Copyright © 2013. All Rights Reserved.