Class RoundedRectangle

All Implemented Interfaces:
Mask

public class RoundedRectangle extends Shape<RoundedRectangle>
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.
  • Method Details

    • setWidth

      public RoundedRectangle setWidth(int width)
      Sets the width of this RoundedRectangle in world units.

      Default is 100.

      Parameters:
      width - the width for this RoundedRectangle.
      Returns:
      this RoundedRectangle
    • setWidth

      public RoundedRectangle setWidth(int width, Curve curve)
      Sets the width of this RoundedRectangle in world units.

      Default is 100.

      Parameters:
      width - the width for this RoundedRectangle.
      curve - the transition to animate between values of this property.
      Returns:
      this RoundedRectangle
    • getWidth

      public int getWidth()
      Returns the width of this RoundedRectangle in world units.

      Default is 100.

      Returns:
      the width of this RoundedRectangle.
    • setHeight

      public RoundedRectangle setHeight(int height)
      Sets the height of this RoundedRectangle in world units.

      Default is 100.

      Parameters:
      height - the height for this RoundedRectangle.
      Returns:
      this RoundedRectangle
    • setHeight

      public RoundedRectangle setHeight(int height, Curve curve)
      Sets the height of this RoundedRectangle in world units.

      Default is 100.

      Parameters:
      height - the height for this RoundedRectangle.
      curve - the transition to animate between values of this property.
      Returns:
      this RoundedRectangle
    • getHeight

      public int getHeight()
      Returns the height of this RoundedRectangle in world units.

      Default is 100.

      Returns:
      the height of this RoundedRectangle.
    • setRadius

      public RoundedRectangle setRadius(int radius, Curve curve)
      Sets the radius of this RoundedRectangle's corners in world units.

      Default is 20.

      Parameters:
      radius - the radius for the corners of this RoundedRectangle.
      curve - the transition to animate between values of this property.
      Returns:
      this RoundedRectangle
    • setRadius

      public RoundedRectangle setRadius(int radius)
      Sets the radius of this RoundedRectangle's corners in world units.

      Default is 20.

      Parameters:
      radius - the radius for the corners of this RoundedRectangle.
      Returns:
      this RoundedRectangle
    • getRadius

      public int getRadius()
      Returns the radius of this RoundedRectangle's corners in world units.

      Default is 20.

      Returns:
      the radius of the corners of this RoundedRectangle.