Package com.prineside.tdi2.scene2d.utils
Class TiledDrawable
java.lang.Object
com.prineside.tdi2.scene2d.utils.BaseDrawable
com.prineside.tdi2.scene2d.utils.TextureRegionDrawable
com.prineside.tdi2.scene2d.utils.TiledDrawable
- All Implemented Interfaces:
Drawable,TransformDrawable
Draws a
TextureRegion repeatedly to fill the area, instead of stretching it.- Author:
- Nathan Sweet, Thomas Creutzenberg
-
Constructor Summary
ConstructorsConstructorDescriptionTiledDrawable(TextureRegion region) TiledDrawable(TextureRegionDrawable drawable) -
Method Summary
Modifier and TypeMethodDescriptionvoidDraws this drawable at the specified bounds.voiddraw(Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) static voiddraw(Batch batch, TextureRegion textureRegion, float x, float y, float width, float height, float scale, int align) intgetAlign()getColor()floatgetScale()voidsetAlign(int align) voidsetScale(float scale) Creates a new drawable that renders the same as this drawable tinted the specified color.Methods inherited from class com.prineside.tdi2.scene2d.utils.TextureRegionDrawable
getRegion, setRegionMethods inherited from class com.prineside.tdi2.scene2d.utils.BaseDrawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getName, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinSize, setMinWidth, setName, setPadding, setRightWidth, setTopHeight, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.prineside.tdi2.scene2d.utils.Drawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight
-
Constructor Details
-
TiledDrawable
public TiledDrawable() -
TiledDrawable
-
TiledDrawable
-
-
Method Details
-
draw
Description copied from interface:DrawableDraws this drawable at the specified bounds. The drawable should be tinted withBatch.getColor(), possibly by mixing its own color.- Specified by:
drawin interfaceDrawable- Overrides:
drawin classTextureRegionDrawable
-
draw
public static void draw(Batch batch, TextureRegion textureRegion, float x, float y, float width, float height, float scale, int align) -
draw
public void draw(Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) - Specified by:
drawin interfaceTransformDrawable- Overrides:
drawin classTextureRegionDrawable
-
getColor
-
setScale
public void setScale(float scale) -
getScale
public float getScale() -
getAlign
public int getAlign() -
setAlign
public void setAlign(int align) -
tint
Description copied from class:TextureRegionDrawableCreates a new drawable that renders the same as this drawable tinted the specified color.- Overrides:
tintin classTextureRegionDrawable
-