Package com.prineside.tdi2.scene2d.utils
Class TextureRegionDrawable
java.lang.Object
com.prineside.tdi2.scene2d.utils.BaseDrawable
com.prineside.tdi2.scene2d.utils.TextureRegionDrawable
- All Implemented Interfaces:
Drawable
,TransformDrawable
- Direct Known Subclasses:
TiledDrawable
Drawable for a
TextureRegion
.- Author:
- Nathan Sweet
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an uninitialized TextureRegionDrawable.TextureRegionDrawable
(TextureRegion region) TextureRegionDrawable
(Texture texture) TextureRegionDrawable
(TextureRegionDrawable drawable) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Draws this drawable at the specified bounds.void
draw
(Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) void
setRegion
(TextureRegion region) Creates a new drawable that renders the same as this drawable tinted the specified color.Methods 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, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.prineside.tdi2.scene2d.utils.Drawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight
-
Constructor Details
-
TextureRegionDrawable
public TextureRegionDrawable()Creates an uninitialized TextureRegionDrawable. The texture region must be set before use. -
TextureRegionDrawable
-
TextureRegionDrawable
-
TextureRegionDrawable
-
-
Method Details
-
draw
Description copied from interface:Drawable
Draws this drawable at the specified bounds. The drawable should be tinted withBatch.getColor()
, possibly by mixing its own color.- Specified by:
draw
in interfaceDrawable
- Overrides:
draw
in classBaseDrawable
-
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:
draw
in interfaceTransformDrawable
-
setRegion
-
getRegion
-
tint
Creates a new drawable that renders the same as this drawable tinted the specified color.
-