Class TextureRegionConfig

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

public final class TextureRegionConfig extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    com.badlogic.gdx.graphics.Color
     
    float
     
    float
     
    float
     
    com.badlogic.gdx.graphics.g2d.TextureRegion
     
    float
     
    float
     
    float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TextureRegionConfig(com.badlogic.gdx.graphics.g2d.TextureRegion region)
     
    TextureRegionConfig(com.badlogic.gdx.graphics.g2d.TextureRegion region, float x, float y, float refSize)
    Create by reference size Width and height will be taken from region itself
    TextureRegionConfig(com.badlogic.gdx.graphics.g2d.TextureRegion region, float x, float y, float originX, float originY, float width, float height)
    All values must be between 0 and 1
    TextureRegionConfig(com.badlogic.gdx.graphics.g2d.TextureRegion region, float x, float y, float originX, float originY, float width, float height, float refSize)
    All values will be divided by refSize
    TextureRegionConfig(com.badlogic.gdx.graphics.g2d.TextureRegion region, float x, float y, float originX, float originY, float width, float height, float refSize, com.badlogic.gdx.graphics.Color color)
     
    TextureRegionConfig(com.badlogic.gdx.graphics.g2d.TextureRegion region, float x, float y, float originX, float originY, float width, float height, com.badlogic.gdx.graphics.Color color)
    All values must be between 0 and 1
    Square texture which fills all of the space (width, height = 1f, x, y = 0f, origin = 0.5f)
  • Method Summary

    Modifier and Type
    Method
    Description
    com.badlogic.gdx.scenes.scene2d.ui.Image
    createImage(float x, float y, float size)
     
    com.badlogic.gdx.graphics.g2d.Sprite
    createSprite(float size)
     
    void
    drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size)
     
    void
    drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, float scale, float angle)
     
    static void
    drawBatch(com.badlogic.gdx.utils.Array<TextureRegionConfig> trs, com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size)
     
    static void
    drawBatch(com.badlogic.gdx.utils.Array<TextureRegionConfig> trs, com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, float scale, float angle)
     
    void
    drawCache(com.badlogic.gdx.graphics.g2d.SpriteCache cache, float x, float y, float size)
     
    static void
    drawCache(com.badlogic.gdx.utils.Array<TextureRegionConfig> trs, com.badlogic.gdx.graphics.g2d.SpriteCache cache, float x, float y, float size)
     
    fromJson(com.badlogic.gdx.utils.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) +
    static Quad
    toQuad(com.badlogic.gdx.utils.Array<TextureRegionConfig> arr)
     
    static Quad
    toQuad(com.badlogic.gdx.utils.Array<TextureRegionConfig> arr, float width, float height)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • textureRegion

      public com.badlogic.gdx.graphics.g2d.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 com.badlogic.gdx.graphics.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(com.badlogic.gdx.graphics.g2d.TextureRegion region)
    • TextureRegionConfig

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

      public TextureRegionConfig(com.badlogic.gdx.graphics.g2d.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(com.badlogic.gdx.graphics.g2d.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(com.badlogic.gdx.graphics.g2d.TextureRegion region, float x, float y, float originX, float originY, float width, float height, com.badlogic.gdx.graphics.Color color)
      All values must be between 0 and 1
    • TextureRegionConfig

      public TextureRegionConfig(com.badlogic.gdx.graphics.g2d.TextureRegion region, float x, float y, float originX, float originY, float width, float height, float refSize, com.badlogic.gdx.graphics.Color color)
  • Method Details

    • fromJson

      public static TextureRegionConfig fromJson(com.badlogic.gdx.utils.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(com.badlogic.gdx.utils.Array<TextureRegionConfig> arr)
    • toQuad

      public static Quad toQuad(com.badlogic.gdx.utils.Array<TextureRegionConfig> arr, float width, float height)
    • createSprite

      public com.badlogic.gdx.graphics.g2d.Sprite createSprite(float size)
    • createImage

      public com.badlogic.gdx.scenes.scene2d.ui.Image createImage(float x, float y, float size)
    • drawCache

      public void drawCache(com.badlogic.gdx.graphics.g2d.SpriteCache cache, float x, float y, float size)
    • drawBatch

      public void drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, float scale, float angle)
    • drawBatch

      public void drawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size)
    • drawCache

      public static void drawCache(com.badlogic.gdx.utils.Array<TextureRegionConfig> trs, com.badlogic.gdx.graphics.g2d.SpriteCache cache, float x, float y, float size)
    • drawBatch

      public static void drawBatch(com.badlogic.gdx.utils.Array<TextureRegionConfig> trs, com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size)
    • drawBatch

      public static void drawBatch(com.badlogic.gdx.utils.Array<TextureRegionConfig> trs, com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, float scale, float angle)