Class RoundedRectangle
java.lang.Object
com.codingame.gameengine.module.entities.Entity<T>
com.codingame.gameengine.module.entities.BlendableEntity<T>
com.codingame.gameengine.module.entities.Shape<RoundedRectangle>
com.codingame.gameengine.module.entities.RoundedRectangle
- All Implemented Interfaces:
Mask
A RoundedRectangle specifies an area in a the
world enclosed by the Rectangle's upper-left point (x,y), its width, and its height.
The rectangle on screen will have rounded corners
The coordinates, width and height are in world units.-
Nested Class Summary
Nested classes/interfaces inherited from class com.codingame.gameengine.module.entities.BlendableEntity
BlendableEntity.BlendMode -
Method Summary
Modifier and TypeMethodDescriptionintReturns the height of thisRoundedRectanglein world units.intReturns the radius of thisRoundedRectangle's corners in world units.intgetWidth()Returns the width of thisRoundedRectanglein world units.setHeight(int height) Sets the height of thisRoundedRectanglein world units.Sets the height of thisRoundedRectanglein world units.setRadius(int radius) Sets the radius of thisRoundedRectangle's corners in world units.Sets the radius of thisRoundedRectangle's corners in world units.setWidth(int width) Sets the width of thisRoundedRectanglein world units.Sets the width of thisRoundedRectanglein world units.Methods inherited from class com.codingame.gameengine.module.entities.Shape
getFillAlpha, getFillColor, getLineAlpha, getLineColor, getLineWidth, setFillAlpha, setFillAlpha, setFillColor, setFillColor, setLineAlpha, setLineAlpha, setLineColor, setLineColor, setLineWidth, setLineWidthMethods inherited from class com.codingame.gameengine.module.entities.BlendableEntity
getBlendMode, setBlendModeMethods inherited from class com.codingame.gameengine.module.entities.Entity
getAlpha, getId, getMask, getParent, getRotation, getScaleX, getScaleY, getSkewX, getSkewY, getX, getY, getZIndex, isVisible, requireValidAlpha, requireValidColor, self, set, set, setAlpha, setAlpha, setMask, setMask, setRotation, setRotation, setScale, setScale, setScaleX, setScaleX, setScaleY, setScaleY, setSkewX, setSkewX, setSkewY, setSkewY, setVisible, setX, setX, setY, setY, setZIndex
-
Method Details
-
setWidth
Sets the width of thisRoundedRectanglein world units.Default is 100.
- Parameters:
width- the width for thisRoundedRectangle.- Returns:
- this
RoundedRectangle
-
setWidth
Sets the width of thisRoundedRectanglein world units.Default is 100.
- Parameters:
width- the width for thisRoundedRectangle.curve- the transition to animate between values of this property.- Returns:
- this
RoundedRectangle
-
getWidth
public int getWidth()Returns the width of thisRoundedRectanglein world units.Default is 100.
- Returns:
- the width of this
RoundedRectangle.
-
setHeight
Sets the height of thisRoundedRectanglein world units.Default is 100.
- Parameters:
height- the height for thisRoundedRectangle.- Returns:
- this
RoundedRectangle
-
setHeight
Sets the height of thisRoundedRectanglein world units.Default is 100.
- Parameters:
height- the height for thisRoundedRectangle.curve- the transition to animate between values of this property.- Returns:
- this
RoundedRectangle
-
getHeight
public int getHeight()Returns the height of thisRoundedRectanglein world units.Default is 100.
- Returns:
- the height of this
RoundedRectangle.
-
setRadius
Sets the radius of thisRoundedRectangle's corners in world units.Default is 20.
- Parameters:
radius- the radius for the corners of thisRoundedRectangle.curve- the transition to animate between values of this property.- Returns:
- this
RoundedRectangle
-
setRadius
Sets the radius of thisRoundedRectangle's corners in world units.Default is 20.
- Parameters:
radius- the radius for the corners of thisRoundedRectangle.- Returns:
- this
RoundedRectangle
-
getRadius
public int getRadius()Returns the radius of thisRoundedRectangle's corners in world units.Default is 20.
- Returns:
- the radius of the corners of this
RoundedRectangle.
-