new Ellipse(x, y, width, height)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
x |
number | 0 | The X coordinate of the center of the ellipse |
y |
number | 0 | The Y coordinate of the center of the ellipse |
width |
number | 0 | The half width of this ellipse |
height |
number | 0 | The half height of this ellipse |
- Source:
Members
-
height :number
-
Type:
- number
- Default Value:
-
- 0
- Source:
-
type :number
-
The type of the object, mainly used to avoid
instanceof
checksType:
- number
- Source:
-
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 Ellipse instance
- Source:
Returns:
a copy of the ellipse
- Type
- Ellipse
-
contains(x, y)
-
Checks whether the x and y coordinates given are contained within this ellipse
Parameters:
Name Type Description x
number The X coordinate of the point to test
y
number The Y coordinate of the point to test
- Source:
Returns:
Whether the x/y coords are within this ellipse
- Type
- boolean
-
getBounds()
-
Returns the framing rectangle of the ellipse as a Rectangle object
- Source:
Returns:
the framing rectangle
- Type
- Rectangle