Optionalx: number
The x position of the center of the ellipse. Default 0.
Optionaly: number
The y position of the center of the ellipse. Default 0.
Optionalwidth: number
The width of the ellipse. Default 0.
Optionalheight: number
The height of the ellipse. Default 0.
The bottom position of the Ellipse.
The height of the ellipse.
The left position of the Ellipse.
The right position of the Ellipse.
The top position of the Ellipse.
ReadonlytypeThe geometry constant type of this object: GEOM_CONST.ELLIPSE.
Used for fast type comparisons.
The width of the ellipse.
The x position of the center of the ellipse.
The y position of the center of the ellipse.
Check to see if the Ellipse contains the given x / y coordinates.
The x coordinate to check within the ellipse.
The y coordinate to check within the ellipse.
True if the coordinates are within the ellipse, otherwise false.
Returns the major radius of the ellipse. Also known as the Semi Major Axis.undefined
The major radius.
Returns the minor radius of the ellipse. Also known as the Semi Minor Axis.undefined
The minor radius.
Returns a Vector2 object containing the coordinates of a point on the circumference of the Ellipse based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point at 180 degrees around the ellipse.
A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse.
Optionalpoint: Vector2
A Vector2 to store the return values in. If not given a Vector2 object will be created.
A Vector2 instance containing the coordinates of the point around the ellipse.
Returns an array of Vector2 objects containing the coordinates of the points around the circumference of the Ellipse, based on the given quantity or stepRate values.
The amount of points to return. If a falsey value the quantity will be derived from the stepRate instead.
OptionalstepRate: number
Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.
Optionaloutput: O
An array to insert the Vector2s in. If not provided a new array will be created.
An array of Vector2 objects pertaining to the points around the circumference of the ellipse.
Checks to see if the Ellipse is empty: has a width or height of zero or less.undefined
True if the Ellipse is empty, otherwise false.
Sets this Ellipse to be empty with a width and height of zero. Does not change its position.undefined
This Ellipse object.
Sets the position of this Ellipse. If the y argument is omitted, both the x and y positions
will be set to the value of x.
The x position of the center of the ellipse.
The y position of the center of the ellipse.
This Ellipse object.
Sets the size of this Ellipse. Does not change its position.
If the height argument is omitted it will be set equal to width, producing a circle.
The width of the ellipse.
Optionalheight: number
The height of the ellipse. Default width.
This Ellipse object.
Sets the x, y, width and height of this ellipse.
The x position of the center of the ellipse.
The y position of the center of the ellipse.
The width of the ellipse.
The height of the ellipse.
This Ellipse object.
StaticAreaCalculates the area of the given Ellipse using the formula: π × majorRadius × minorRadius. Returns 0 if the Ellipse is empty (i.e. has no width or height).
The Ellipse to get the area of.
The area of the Ellipse, or 0 if the Ellipse is empty.
StaticCircumferenceReturns the circumference of the given Ellipse.
The Ellipse to get the circumference of.
The circumference of the Ellipse.
StaticCircumferenceStaticCloneStaticContainsCheck to see if the Ellipse contains the given x / y coordinates.
The Ellipse to check.
The x coordinate to check within the ellipse.
The y coordinate to check within the ellipse.
True if the coordinates are within the ellipse, otherwise false.
StaticContainsCheck to see if the Ellipse contains the given x and y coordinates as stored in the Vector2.
True if the Vector2 coordinates are within the ellipse, otherwise false.
StaticContainsCheck to see if the Ellipse contains all four points of the given Rectangle object.
True if all of the Rectangle coordinates are within the ellipse, otherwise false.
StaticCopyStaticEqualsCompares the x, y, width and height properties of the two given Ellipses.
Returns true if they all match, otherwise returns false.
true if the two Ellipse equal each other, otherwise false.
StaticGetStaticGetReturns a Vector2 object containing the coordinates of a point on the circumference of the Ellipse based on the given angle normalized to the range 0 to 1. i.e. a value of 0.5 will give the point at 180 degrees around the ellipse.
The Ellipse to get the circumference point on.
A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 degrees around the ellipse.
Optionalout: O
A Vector2 object to store the return values in. If not given a new Vector2 object will be created.
A Vector2 object, containing the coordinates of the point around the ellipse.
StaticGetReturns an array of Vector2 objects containing the coordinates of the points around the circumference of the Ellipse, based on the given quantity or stepRate values.
The Ellipse to get the points from.
The amount of points to return. If a falsy value the quantity will be derived from the stepRate instead.
OptionalstepRate: number
Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.
Optionalout: O
An array to insert the Vector2 objects into. If not provided a new array will be created.
An array of Vector2 objects pertaining to the points around the circumference of the ellipse.
StaticOffsetStaticOffsetStaticRandom
An Ellipse object.
An Ellipse is defined by its center position (x, y), a total width, and a total height. It can be used for geometric intersection tests (point-in-ellipse containment), sampling evenly-spaced or random points on its circumference or interior, and as a lightweight shape descriptor for collision or hit-area purposes.
This is a geometry object, containing numerical values and related methods to inspect and modify them. It is not a Game Object, in that you cannot add it to the display list, and it has no texture. To render an Ellipse you should look at the capabilities of the Graphics class.