Package com.prineside.tdi2.utils
Class TextureRegionConfig
java.lang.Object
com.prineside.tdi2.utils.TextureRegionConfig
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTextureRegionConfig(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 itselfTextureRegionConfig(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 1TextureRegionConfig(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 refSizeTextureRegionConfig(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 1Square texture which fills all of the space (width, height = 1f, x, y = 0f, origin = 0.5f) -
Method Summary
Modifier and TypeMethodDescriptioncom.badlogic.gdx.scenes.scene2d.ui.ImagecreateImage(float x, float y, float size) com.badlogic.gdx.graphics.g2d.SpritecreateSprite(float size) voiddrawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size) voiddrawBatch(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, float scale, float angle) static voiddrawBatch(com.badlogic.gdx.utils.Array<TextureRegionConfig> trs, com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size) static voiddrawBatch(com.badlogic.gdx.utils.Array<TextureRegionConfig> trs, com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float size, float scale, float angle) voiddrawCache(com.badlogic.gdx.graphics.g2d.SpriteCache cache, float x, float y, float size) static voiddrawCache(com.badlogic.gdx.utils.Array<TextureRegionConfig> trs, com.badlogic.gdx.graphics.g2d.SpriteCache cache, float x, float y, float size) static TextureRegionConfigfromJson(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) +
-
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
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
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) + -
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)
-