Package com.prineside.tdi2.utils
Class TextureRegionConfig
java.lang.Object
com.prineside.tdi2.utils.TextureRegionConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloatfloatfloatfloatfloatfloat -
Constructor Summary
ConstructorsConstructorDescriptionTextureRegionConfig(TextureRegion region) TextureRegionConfig(TextureRegion region, float x, float y, float refSize) Create by reference size Width and height will be taken from region itselfTextureRegionConfig(TextureRegion region, float x, float y, float originX, float originY, float width, float height) All values must be between 0 and 1TextureRegionConfig(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float refSize) All values will be divided by refSizeTextureRegionConfig(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float refSize, Color color) TextureRegionConfig(TextureRegion region, float x, float y, float originX, float originY, float width, float height, 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 TypeMethodDescriptioncreateImage(float x, float y, float size) createSprite(float size) voidvoidstatic voiddrawBatch(Array<TextureRegionConfig> trs, Batch batch, float x, float y, float size) static voiddrawBatch(Array<TextureRegionConfig> trs, Batch batch, float x, float y, float size, float scale, float angle) voiddrawCache(SpriteCache cache, float x, float y, float size) static voiddrawCache(Array<TextureRegionConfig> trs, SpriteCache cache, float x, float y, float size) static TextureRegionConfigalias 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 QuadtoQuad(Array<TextureRegionConfig> arr) static QuadtoQuad(Array<TextureRegionConfig> arr, float width, float height)
-
Field Details
-
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
-
-
Constructor Details
-
TextureRegionConfig
Square texture which fills all of the space (width, height = 1f, x, y = 0f, origin = 0.5f) -
TextureRegionConfig
-
TextureRegionConfig
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
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
-
toQuad
-
createSprite
-
createImage
-
drawCache
-
drawBatch
-
drawBatch
-
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)
-