Class TextureRegionDrawable

java.lang.Object
arc.scene.style.BaseDrawable
arc.scene.style.TextureRegionDrawable
All Implemented Interfaces:
Drawable, TransformDrawable
Direct Known Subclasses:
TiledDrawable

public class TextureRegionDrawable extends BaseDrawable implements TransformDrawable
Drawable for a TextureRegion.
  • Field Details

    • region

      protected TextureRegion region
    • tint

      protected Color tint
    • scale

      protected float scale
  • Constructor Details

    • TextureRegionDrawable

      public TextureRegionDrawable()
      Creates an uninitialized TextureRegionDrawable. The texture region must be set before use.
    • TextureRegionDrawable

      public TextureRegionDrawable(TextureRegion region)
    • TextureRegionDrawable

      public TextureRegionDrawable(TextureRegion region, float scale)
    • TextureRegionDrawable

      public TextureRegionDrawable(TextureRegionDrawable drawable)
  • Method Details

    • imageSize

      public float imageSize()
      Specified by:
      imageSize in interface Drawable
    • 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 interface Drawable
      Overrides:
      draw in class BaseDrawable
    • 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 interface Drawable
      Specified by:
      draw in interface TransformDrawable
      Overrides:
      draw in class BaseDrawable
    • set

      public TextureRegionDrawable set(TextureRegion region)
    • getRegion

      public TextureRegion getRegion()
    • setRegion

      public void setRegion(TextureRegion region)
    • tint

      public Drawable tint(float r, float g, float b, float a)
      Creates a new drawable that renders the same as this drawable tinted the specified color.
    • tint

      public Drawable tint(Color tint)
      Creates a new drawable that renders the same as this drawable tinted the specified color.