Package com.prineside.tdi2.utils
Class QuadRegion
java.lang.Object
com.prineside.tdi2.utils.AbstractDrawable
com.prineside.tdi2.utils.QuadRegion
- All Implemented Interfaces:
 Drawable,TransformDrawable
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic interfacestatic final classstatic final class - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final byteFields 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
ConstructorsConstructorDescriptionQuadRegion(float[] positions, float x, float y) QuadRegion(ResourcePack.AtlasTextureRegion region, float x, float y, float width, float height) QuadRegion(ResourcePack.AtlasTextureRegion region, float x, float y, float width, float height, Color tint) QuadRegion(QuadRegion from)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidDraw vertices at the specified xy with width,height.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 cos, float sin) voiddrawToCache(SpriteCache spriteCache, float x, float y, float width, float height) static QuadRegionfromBytes(FixedInput input) static QuadRegionstatic QuadRegionfromJson(com.fasterxml.jackson.databind.JsonNode regionJson, AssetProvider<TextureRegion> regionProvider) bytefloat[]floatbytefloatgetWidth()floatgetX()floatgetY()booleanbooleanbooleanbooleanvoidmultiplyCornerColors(Color color) voidrotateAround(float x, float y, float angle) booleansameAs(QuadRegion region) voidset(QuadRegion region) voidsetColorMode(byte colorMode) voidsetCornerColorsObject(QuadRegion.CornerColors cornerColors) voidsetCornerColorsSeparate(Color bl, Color tl, Color tr, Color br) voidsetCornerPositions(float[] v) voidsetCornerPositions(float aX, float aY, float bX, float bY, float cX, float cY, float dX, float dY) voidsetNinePathRegion(byte ninePathRegion) voidsetPosition(float x, float y) voidsetRegionName(String regionName) voidsetRegionNameFromProvider(String regionName, AssetProvider<TextureRegion> regionProvider) voidsetSameCornerColors(Color color) voidvoidsetVisible(boolean visible) voidShift the position if minX / minY is not zerovoidtoBytes(FixedOutput output) voidvoidGenerates Json5voidtranslate(float x, float y) voidMethods 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
- 
NINE_PATH_NONE
public static final byte NINE_PATH_NONE- See Also:
 
 - 
COLOR_MODE_INHERIT
public static final byte COLOR_MODE_INHERIT- See Also:
 
 - 
COLOR_MODE_STATIC_RGB
public static final byte COLOR_MODE_STATIC_RGB- See Also:
 
 - 
COLOR_MODE_STATIC_RGBA
public static final byte COLOR_MODE_STATIC_RGBA- See Also:
 
 - 
regionName
 - 
quadName
 
 - 
 - 
Constructor Details
- 
QuadRegion
 - 
QuadRegion
public QuadRegion(float[] positions, float x, float y)  - 
QuadRegion
public QuadRegion(ResourcePack.AtlasTextureRegion region, float x, float y, float width, float height)  - 
QuadRegion
public QuadRegion(ResourcePack.AtlasTextureRegion region, float x, float y, float width, float height, Color tint)  
 - 
 - 
Method Details
- 
sameAs
 - 
getRegionName
 - 
getQuadName
 - 
isDebugging
public boolean isDebugging() - 
isSingleColor
public boolean isSingleColor() - 
isVisible
public boolean isVisible() - 
setVisible
public void setVisible(boolean visible)  - 
getNinePathRegion
public byte getNinePathRegion() - 
setNinePathRegion
public void setNinePathRegion(byte ninePathRegion)  - 
getColorMode
public byte getColorMode() - 
setColorMode
public void setColorMode(byte colorMode)  - 
setRegionName
- Parameters:
 regionName- may be null to set blank. Will set from a default provider of TextureRegion. If region is not found, name will be preserved but actual region will be set to blank
 - 
setRegionNameFromProvider
public void setRegionNameFromProvider(String regionName, AssetProvider<TextureRegion> regionProvider)  - 
setPosition
public void setPosition(float x, float y)  - 
set
 - 
getX
public float getX() - 
getY
public float getY() - 
getWidth
public float getWidth() - 
getHeight
public float getHeight() - 
getCornerPositions
public float[] getCornerPositions() - 
getCornerColors
 - 
setCornerColorsSeparate
 - 
setSameCornerColors
 - 
multiplyCornerColors
 - 
setCornerColorsObject
 - 
setCornerPositions
public void setCornerPositions(float aX, float aY, float bX, float bY, float cX, float cY, float dX, float dY)  - 
setCornerPositions
public void setCornerPositions(float[] v)  - 
shiftPositionToMatchCorners
public void shiftPositionToMatchCorners()Shift the position if minX / minY is not zero - 
translate
public void translate(float x, float y)  - 
setTextureRegion
 - 
updateSize
public void updateSize() - 
getTextureRegion
 - 
draw
Draw vertices at the specified xy with width,height. Position rect of the region is ignored - 
drawToCache
 - 
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
 - 
rotateAround
public void rotateAround(float x, float y, float angle)  - 
drawDebug
public void drawDebug(ShapeRenderer sRenderer, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float cos, float sin)  - 
fromJson
public static QuadRegion fromJson(com.fasterxml.jackson.databind.JsonNode regionJson, AssetProvider<TextureRegion> regionProvider)  - 
fromJson
 - 
isFullSizeRect
public boolean isFullSizeRect() - 
toJson5String
Generates Json5 - 
toBytes
 - 
fromBytes
 - 
toJson
 
 -