new RoundedRectangle(x, y, width, height, radius)
Parameters:
Name | Type | Description |
---|---|---|
x |
number | The X coordinate of the upper-left corner of the rounded rectangle |
y |
number | The Y coordinate of the upper-left corner of the rounded rectangle |
width |
number | The overall width of this rounded rectangle |
height |
number | The overall height of this rounded rectangle |
radius |
number | Controls the radius of the rounded corners |
Members
-
height :number
-
Type:
- number
- Default Value:
-
- 0
- Source:
-
radius :number
-
Type:
- number
- Default Value:
-
- 20
- Source:
-
type :number
-
The type of the object, mainly used to avoid
instanceof
checksType:
- number
-
width :number
-
Type:
- number
- Default Value:
-
- 0
- Source:
-
x :number
-
Type:
- number
- Default Value:
-
- 0
- Source:
-
y :number
-
Type:
- number
- Default Value:
-
- 0
- Source:
Methods
-
clone()
-
Creates a clone of this Rounded Rectangle
Returns:
a copy of the rounded rectangle
- Type
- RoundedRectangle
-
contains(x, y)
-
Checks whether the x and y coordinates given are contained within this Rounded Rectangle
Parameters:
Name Type Description x
number The X coordinate of the point to test
y
number The Y coordinate of the point to test
Returns:
Whether the x/y coordinates are within this Rounded Rectangle
- Type
- boolean