Class TiledDrawable

All Implemented Interfaces:
Drawable, TransformDrawable

public class TiledDrawable extends TextureRegionDrawable
Draws a TextureRegion repeatedly to fill the area, instead of stretching it.
Author:
Nathan Sweet, Thomas Creutzenberg
  • Constructor Details

  • Method Details

    • draw

      public void draw(Batch batch, float x, float y, float width, float height)
      Description copied from interface: Drawable
      Draws this drawable at the specified bounds. The drawable should be tinted with Batch.getColor(), possibly by mixing its own color.
      Specified by:
      draw in interface Drawable
      Overrides:
      draw in class TextureRegionDrawable
    • 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:
      draw in interface TransformDrawable
      Overrides:
      draw in class TextureRegionDrawable
    • getColor

      public Color getColor()
    • setScale

      public void setScale(float scale)
    • getScale

      public float getScale()
    • getAlign

      public int getAlign()
    • setAlign

      public void setAlign(int align)
    • tint

      public TiledDrawable tint(Color tint)
      Description copied from class: TextureRegionDrawable
      Creates a new drawable that renders the same as this drawable tinted the specified color.
      Overrides:
      tint in class TextureRegionDrawable