APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.scenes.scene2d.utils

public Class TiledDrawable

extends TextureRegionDrawable
Class Inheritance
Imports
com.badlogic.gdx.graphics.Color, .Texture, com.badlogic.gdx.graphics.g2d.Batch, .TextureRegion, com.badlogic.gdx.utils.Align

Draws a TextureRegion repeatedly to fill the area, instead of stretching it.
Authors
Nathan Sweet, Thomas Creutzenberg

Field Summary

Modifier and TypeField and Description
private int
private final Color
private float

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public void
draw(Batch batch, float x, float y, float width, float height)

Overrides com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable.draw.

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.draw.

Draws this drawable at the specified bounds.

public static void
draw(Batch batch, TextureRegion textureRegion, float x, float y, float width, float height, float scale, int align)

public void
draw(Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)

Overrides com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable.draw.

Implements com.badlogic.gdx.scenes.scene2d.utils.TransformDrawable.draw.

public int
public Color
public float
public void
setAlign(int align)

public void
setScale(float scale)

public TiledDrawable
tint(Color tint)

Overrides com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable.tint.

Creates a new drawable that renders the same as this drawable tinted the specified color.

Inherited from com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable:
getRegionsetRegion

Field Detail

alignback to summary
private int align
colorback to summary
private final Color color
scaleback to summary
private float scale

Constructor Detail

TiledDrawableback to summary
public TiledDrawable()
TiledDrawableback to summary
public TiledDrawable(TextureRegion region)
TiledDrawableback to summary
public TiledDrawable(TextureRegionDrawable drawable)

Method Detail

drawback to summary
public void draw(Batch batch, float x, float y, float width, float height)

Overrides com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable.draw.

Implements com.badlogic.gdx.scenes.scene2d.utils.Drawable.draw.

Doc from com.badlogic.gdx.scenes.scene2d.utils.Drawable.draw.

Draws this drawable at the specified bounds. The drawable should be tinted with Batch#getColor(), possibly by mixing its own color.

drawback to summary
public static void draw(Batch batch, TextureRegion textureRegion, float x, float y, float width, float height, float scale, int align)
drawback to summary
public void draw(Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)

Overrides com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable.draw.

Implements com.badlogic.gdx.scenes.scene2d.utils.TransformDrawable.draw.

getAlignback to summary
public int getAlign()
getColorback to summary
public Color getColor()
getScaleback to summary
public float getScale()
setAlignback to summary
public void setAlign(int align)
setScaleback to summary
public void setScale(float scale)
tintback to summary
public TiledDrawable tint(Color tint)

Overrides com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable.tint.

Doc from com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable.tint.

Creates a new drawable that renders the same as this drawable tinted the specified color.