Package com.prineside.tdi2.scene2d.utils
Class BaseDrawable
java.lang.Object
com.prineside.tdi2.scene2d.utils.BaseDrawable
- All Implemented Interfaces:
Drawable
- Direct Known Subclasses:
NinePatchDrawable
,QuadDrawable
,QuadDrawableStack
,SpriteDrawable
,TextureRegionDrawable
Drawable that stores the size information but doesn't draw anything.
- Author:
- Nathan Sweet
-
Constructor Summary
ConstructorsConstructorDescriptionBaseDrawable
(Drawable drawable) Creates a new empty drawable with the same sizing information as the specified drawable. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Draws this drawable at the specified bounds.float
float
float
float
getName()
float
float
void
setBottomHeight
(float bottomHeight) void
setLeftWidth
(float leftWidth) void
setMinHeight
(float minHeight) void
setMinSize
(float minWidth, float minHeight) void
setMinWidth
(float minWidth) void
void
setPadding
(float topHeight, float leftWidth, float bottomHeight, float rightWidth) void
setRightWidth
(float rightWidth) void
setTopHeight
(float topHeight) toString()
-
Constructor Details
-
BaseDrawable
public BaseDrawable() -
BaseDrawable
Creates a new empty drawable with the same sizing information as the specified drawable.
-
-
Method Details
-
draw
Description copied from interface:Drawable
Draws this drawable at the specified bounds. The drawable should be tinted withBatch.getColor()
, possibly by mixing its own color. -
getLeftWidth
public float getLeftWidth()- Specified by:
getLeftWidth
in interfaceDrawable
-
setLeftWidth
public void setLeftWidth(float leftWidth) - Specified by:
setLeftWidth
in interfaceDrawable
-
getRightWidth
public float getRightWidth()- Specified by:
getRightWidth
in interfaceDrawable
-
setRightWidth
public void setRightWidth(float rightWidth) - Specified by:
setRightWidth
in interfaceDrawable
-
getTopHeight
public float getTopHeight()- Specified by:
getTopHeight
in interfaceDrawable
-
setTopHeight
public void setTopHeight(float topHeight) - Specified by:
setTopHeight
in interfaceDrawable
-
getBottomHeight
public float getBottomHeight()- Specified by:
getBottomHeight
in interfaceDrawable
-
setBottomHeight
public void setBottomHeight(float bottomHeight) - Specified by:
setBottomHeight
in interfaceDrawable
-
setPadding
public void setPadding(float topHeight, float leftWidth, float bottomHeight, float rightWidth) -
getMinWidth
public float getMinWidth()- Specified by:
getMinWidth
in interfaceDrawable
-
setMinWidth
public void setMinWidth(float minWidth) - Specified by:
setMinWidth
in interfaceDrawable
-
getMinHeight
public float getMinHeight()- Specified by:
getMinHeight
in interfaceDrawable
-
setMinHeight
public void setMinHeight(float minHeight) - Specified by:
setMinHeight
in interfaceDrawable
-
setMinSize
public void setMinSize(float minWidth, float minHeight) -
getName
-
setName
-
toString
-