Package arc.scene.style
Class TextureRegionDrawable
java.lang.Object
arc.scene.style.BaseDrawable
arc.scene.style.TextureRegionDrawable
- All Implemented Interfaces:
Drawable
,TransformDrawable
- Direct Known Subclasses:
TiledDrawable
Drawable for a
TextureRegion
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates an uninitialized TextureRegionDrawable.TextureRegionDrawable
(TextureRegion region) TextureRegionDrawable
(TextureRegion region, float scale) TextureRegionDrawable
(TextureRegionDrawable drawable) -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(float x, float y, float width, float height) Draws this drawable at the specified bounds.void
draw
(float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) float
set
(TextureRegion region) void
setRegion
(TextureRegion region) tint
(float r, float g, float b, float a) Creates a new drawable that renders the same as this drawable tinted the specified color.Creates a new drawable that renders the same as this drawable tinted the specified color.Methods inherited from class arc.scene.style.BaseDrawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getName, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setName, setRightWidth, setTopHeight, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface arc.scene.style.Drawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight
-
Field Details
-
region
-
tint
-
scale
protected float scale
-
-
Constructor Details
-
TextureRegionDrawable
public TextureRegionDrawable()Creates an uninitialized TextureRegionDrawable. The texture region must be set before use. -
TextureRegionDrawable
-
TextureRegionDrawable
-
TextureRegionDrawable
-
-
Method Details
-
imageSize
public float imageSize() -
draw
public void draw(float x, float y, float width, float height) Description copied from interface:Drawable
Draws this drawable at the specified bounds.- Specified by:
draw
in interfaceDrawable
- Overrides:
draw
in classBaseDrawable
-
draw
public void draw(float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) - Specified by:
draw
in interfaceDrawable
- Specified by:
draw
in interfaceTransformDrawable
- Overrides:
draw
in classBaseDrawable
-
set
-
getRegion
-
setRegion
-
tint
Creates a new drawable that renders the same as this drawable tinted the specified color. -
tint
Creates a new drawable that renders the same as this drawable tinted the specified color.
-