Modifier and Type | Field and Description |
---|---|
LibgdxNinePatchWrapper |
ninepatch |
Constructor and Description |
---|
LibgdxNinePatch(LibgdxNinePatch ninepatch) |
LibgdxNinePatch(LibgdxTexture texture,
int left,
int right,
int top,
int bottom) |
LibgdxNinePatch(LibgdxTextureRegion textureRegion,
int left,
int right,
int top,
int bottom) |
Modifier and Type | Method and Description |
---|---|
float |
getBottomHeight() |
Color |
getColor() |
float |
getLeftWidth() |
float |
getMiddleHeight() |
float |
getMiddleWidth() |
float |
getPaddingBottom()
Returns the bottom padding if set, else returns
NinePatch.getBottomHeight() . |
float |
getPaddingLeft()
Returns the left padding if set, else returns
NinePatch.getLeftWidth() . |
float |
getPaddingRight()
Returns the right padding if set, else returns
NinePatch.getRightWidth() . |
float |
getPaddingTop()
Returns the top padding if set, else returns
NinePatch.getTopHeight() . |
float |
getRightWidth() |
Texture |
getTexture() |
float |
getTopHeight() |
float |
getTotalHeight() |
float |
getTotalWidth() |
void |
render(Graphics g,
float x,
float y,
float width,
float height) |
void |
scale(float scaleX,
float scaleY) |
void |
setBottomHeight(float bottomHeight)
Set the draw-time height of the three bottom edge patches
|
void |
setColor(Color color)
Copy given color.
|
void |
setLeftWidth(float leftWidth)
Set the draw-time width of the three left edge patches
|
void |
setMiddleHeight(float middleHeight)
Set the height of the middle row of the patch.
|
void |
setMiddleWidth(float middleWidth)
Set the width of the middle column of the patch.
|
void |
setPadding(float left,
float right,
float top,
float bottom)
Set the padding for content inside this ninepatch.
|
void |
setPaddingBottom(float bottom)
|
void |
setPaddingLeft(float left)
|
void |
setPaddingRight(float right)
|
void |
setPaddingTop(float top)
|
void |
setRightWidth(float rightWidth)
Set the draw-time width of the three right edge patches
|
void |
setTopHeight(float topHeight)
Set the draw-time height of the three top edge patches
|
public final LibgdxNinePatchWrapper ninepatch
public LibgdxNinePatch(LibgdxTexture texture, int left, int right, int top, int bottom)
public LibgdxNinePatch(LibgdxTextureRegion textureRegion, int left, int right, int top, int bottom)
public LibgdxNinePatch(LibgdxNinePatch ninepatch)
public void render(Graphics g, float x, float y, float width, float height)
public void setColor(Color color)
NinePatch
public float getLeftWidth()
getLeftWidth
in interface NinePatch
public void setLeftWidth(float leftWidth)
NinePatch
setLeftWidth
in interface NinePatch
public float getRightWidth()
getRightWidth
in interface NinePatch
public void setRightWidth(float rightWidth)
NinePatch
setRightWidth
in interface NinePatch
public float getTopHeight()
getTopHeight
in interface NinePatch
public void setTopHeight(float topHeight)
NinePatch
setTopHeight
in interface NinePatch
public float getBottomHeight()
getBottomHeight
in interface NinePatch
public void setBottomHeight(float bottomHeight)
NinePatch
setBottomHeight
in interface NinePatch
public float getMiddleWidth()
getMiddleWidth
in interface NinePatch
public void setMiddleWidth(float middleWidth)
NinePatch
default total width
.setMiddleWidth
in interface NinePatch
public float getMiddleHeight()
getMiddleHeight
in interface NinePatch
public void setMiddleHeight(float middleHeight)
NinePatch
default total height
.setMiddleHeight
in interface NinePatch
public float getTotalWidth()
getTotalWidth
in interface NinePatch
public float getTotalHeight()
getTotalHeight
in interface NinePatch
public void setPadding(float left, float right, float top, float bottom)
NinePatch
setPadding
in interface NinePatch
public float getPaddingLeft()
NinePatch
NinePatch.getLeftWidth()
.getPaddingLeft
in interface NinePatch
public void setPaddingLeft(float left)
NinePatch
setPaddingLeft
in interface NinePatch
public float getPaddingRight()
NinePatch
NinePatch.getRightWidth()
.getPaddingRight
in interface NinePatch
public void setPaddingRight(float right)
NinePatch
setPaddingRight
in interface NinePatch
public float getPaddingTop()
NinePatch
NinePatch.getTopHeight()
.getPaddingTop
in interface NinePatch
public void setPaddingTop(float top)
NinePatch
setPaddingTop
in interface NinePatch
public float getPaddingBottom()
NinePatch
NinePatch.getBottomHeight()
.getPaddingBottom
in interface NinePatch
public void setPaddingBottom(float bottom)
NinePatch
setPaddingBottom
in interface NinePatch
public Texture getTexture()
getTexture
in interface NinePatch