Package com.prineside.tdi2.utils
Class Quad
java.lang.Object
com.prineside.tdi2.utils.AbstractDrawable
com.prineside.tdi2.utils.Quad
- All Implemented Interfaces:
 Drawable,TransformDrawable
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final floatbooleanstatic final FixedOutputFields inherited from class com.prineside.tdi2.utils.AbstractDrawable
DRAWABLE_PARAM_BOTTOM_HEIGHT, DRAWABLE_PARAM_LEFT_WIDTH, DRAWABLE_PARAM_MIN_HEIGHT, DRAWABLE_PARAM_MIN_WIDTH, DRAWABLE_PARAM_RIGHT_WIDTH, DRAWABLE_PARAM_TOP_HEIGHT - 
Constructor Summary
ConstructorsConstructorDescriptionQuad(float width, float height) Quad(ResourcePack.AtlasTextureRegion textureRegion)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddRegion(QuadRegion region) voidAppend all of the regions from another setvoidDraws this drawable at the specified bounds.voiddraw(Batch batch, float x, float y, float width, float height, float scaleX, float scaleY, float rotation) voiddraw(Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) voiddrawDebug(ShapeRenderer sRenderer, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) voiddrawToCache(SpriteCache spriteCache, float x, float y, float width, float height) static booleanfloatIsInt(float value) static QuadfromByteArray(byte[] bytes) static QuadfromBytes(FixedInput input) static Quadstatic QuadfromJson(com.fasterxml.jackson.databind.node.ArrayNode jsonValue, AssetProvider<TextureRegion> regionProvider) static QuadfromString(String str) floatstatic QuadfloatfloatfloatgetWidth()static StringintOrFloatString(float value) static voidjsonWriteIntOrFloat(Json json, float value) multiplyRegionColors(Color color) voidreplaceRegionsColor(Color from, Color to) booleanstatic voidsbWriteIntOrFloat(StringBuilder sb, float value) voidvoidsetHeight(float h) voidsetPivot(float x, float y) voidsetSize(float width, float height) voidsetWidth(float w) static StringstripNonAscii(String str) toBase64()voidtoBytes(FixedOutput output) voidvoidvoidtoJson5StringWithIndent(StringBuilder sb, int indent) Methods inherited from class com.prineside.tdi2.utils.AbstractDrawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeightMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.prineside.tdi2.scene2d.utils.Drawable
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight 
- 
Field Details
- 
BINARY_FLOAT_PRECISION
public static final float BINARY_FLOAT_PRECISION- See Also:
 
 - 
BINARY_FLOAT_PRECISION_MUL
public static final float BINARY_FLOAT_PRECISION_MUL- See Also:
 
 - 
debugging
public boolean debugging - 
outputHelper
 
 - 
 - 
Constructor Details
- 
Quad
public Quad(float width, float height)  - 
Quad
- Parameters:
 deepCopy- create new copy of regions instead of sharing them
 - 
Quad
 
 - 
 - 
Method Details
- 
getNoQuad
 - 
sameAs
 - 
set
 - 
addRegion
 - 
appendSet
Append all of the regions from another set - 
replaceRegionsColor
 - 
getRegions
 - 
multiplyRegionColors
 - 
getWidth
public float getWidth() - 
setWidth
public void setWidth(float w)  - 
getHeight
public float getHeight() - 
setHeight
public void setHeight(float h)  - 
setPivot
public void setPivot(float x, float y)  - 
getPivotX
public float getPivotX() - 
getPivotY
public float getPivotY() - 
setSize
public void setSize(float width, float height)  - 
fromString
- Parameters:
 str- JSON or Base64 representation of the Quad
 - 
fromJson
public static Quad fromJson(com.fasterxml.jackson.databind.node.ArrayNode jsonValue, AssetProvider<TextureRegion> regionProvider)  - 
fromJson
 - 
toJson5String
 - 
toJson5StringWithIndent
 - 
floatIsInt
public static boolean floatIsInt(float value)  - 
stripNonAscii
 - 
jsonWriteIntOrFloat
 - 
sbWriteIntOrFloat
 - 
intOrFloatString
 - 
toBytes
 - 
fromByteArray
 - 
fromBytes
 - 
toBase64
 - 
toJson
 - 
drawToCache
 - 
draw
Description copied from interface:DrawableDraws this drawable at the specified bounds. The drawable should be tinted withBatch.getColor(), possibly by mixing its own color. - 
draw
public void draw(Batch batch, float x, float y, float width, float height, float scaleX, float scaleY, float rotation)  - 
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:
 drawin interfaceTransformDrawable
 - 
drawDebug
public void drawDebug(ShapeRenderer sRenderer, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)  
 -