Class TextureRegionConfig

java.lang.Object
com.prineside.tdi2.utils.TextureRegionConfig

public final class TextureRegionConfig extends Object
  • Field Details

    • textureRegion

      public TextureRegion textureRegion
    • x

      public float x
    • y

      public float y
    • width

      public float width
    • height

      public float height
    • originX

      public float originX
    • originY

      public float originY
    • color

      public Color color
  • Constructor Details

    • TextureRegionConfig

      public TextureRegionConfig(TextureRegionConfig config)
      Square texture which fills all of the space (width, height = 1f, x, y = 0f, origin = 0.5f)
    • TextureRegionConfig

      public TextureRegionConfig(TextureRegion region)
    • TextureRegionConfig

      public TextureRegionConfig(TextureRegion region, float x, float y, float refSize)
      Create by reference size Width and height will be taken from region itself
    • TextureRegionConfig

      public TextureRegionConfig(TextureRegion region, float x, float y, float originX, float originY, float width, float height)
      All values must be between 0 and 1
    • TextureRegionConfig

      public TextureRegionConfig(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float refSize)
      All values will be divided by refSize
    • TextureRegionConfig

      public TextureRegionConfig(TextureRegion region, float x, float y, float originX, float originY, float width, float height, Color color)
      All values must be between 0 and 1
    • TextureRegionConfig

      public TextureRegionConfig(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float refSize, Color color)
  • Method Details

    • fromJson

      public static TextureRegionConfig fromJson(JsonValue json)
      alias alias, x, y, w, h (0..1) alias, x, y, w, h, rs (0..rs) alias, x, y, ox, oy, w, h (0..1) + alias, x, y, ox, oy, w, h, rs (0..rs) + alias, x, y, ox, oy, w, h, color (0..1) + alias, x, y, ox, oy, w, h, color, rs (0..rs) +
    • toQuad

      public static Quad toQuad(Array<TextureRegionConfig> arr)
    • toQuad

      public static Quad toQuad(Array<TextureRegionConfig> arr, float width, float height)
    • createSprite

      public Sprite createSprite(float size)
    • createImage

      public Image createImage(float x, float y, float size)
    • drawCache

      public void drawCache(SpriteCache cache, float x, float y, float size)
    • drawBatch

      public void drawBatch(Batch batch, float x, float y, float size, float scale, float angle)
    • drawBatch

      public void drawBatch(Batch batch, float x, float y, float size)
    • drawCache

      public static void drawCache(Array<TextureRegionConfig> trs, SpriteCache cache, float x, float y, float size)
    • drawBatch

      public static void drawBatch(Array<TextureRegionConfig> trs, Batch batch, float x, float y, float size)
    • drawBatch

      public static void drawBatch(Array<TextureRegionConfig> trs, Batch batch, float x, float y, float size, float scale, float angle)