me.Ellipse(x, y, w, h)

new Ellipse(x, y, w, h)

an ellipse Object

Parameters:
Name Type Description
x Number

the center x coordinate of the ellipse

y Number

the center y coordinate of the ellipse

w Number

width (diameter) of the ellipse

h Number

height (diameter) of the ellipse

Extends

Members

static radius :Number

Maximum radius of the ellipse

pos :me.Vector2d

the center coordinates of the ellipse

radiusSq :me.Vector2d

Radius squared, for pythagorean theorom

radiusV :me.Vector2d

Pre-scaled radius vector for ellipse

ratio :me.Vector2d

x/y scaling ratio for ellipse

Methods

clone() → {me.Ellipse}

clone this Ellipse

Returns:
me.Ellipse -

new Ellipse

containsPoint(x, y) → {boolean}

check if this circle/ellipse contains the specified point

Parameters:
Name Type Description
x Number

x coordinate

y Number

y coordinate

Returns:
boolean -

true if contains

containsPointV(point) → {boolean}

check if this circle/ellipse contains the specified point

Parameters:
Name Type Description
point me.Vector2d
Returns:
boolean -

true if contains

getBounds() → {me.Rect}

returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.

Returns:
me.Rect -

this shape bounding box Rectangle object

rotate(angle) → {me.Ellipse}

Rotate this Ellipse (counter-clockwise) by the specified angle (in radians).

Parameters:
Name Type Description
angle Number

The angle to rotate (in radians)

Returns:
me.Ellipse -

Reference to this object for method chaining

scale(x, yopt) → {me.Ellipse}

Scale this Ellipse by the specified scalar.

Parameters:
Name Type Attributes Default Description
x Number
y Number <optional>
x
Returns:
me.Ellipse -

Reference to this object for method chaining

scale(v) → {me.Ellipse}

Scale this Ellipse by the specified vector.

Parameters:
Name Type Description
v me.Vector2d
Returns:
me.Ellipse -

Reference to this object for method chaining

setShape(x, y, w, h)

set new value to the Ellipse shape

Parameters:
Name Type Description
x Number

position of the ellipse

y Number

position of the ellipse

w Number

width (diameter) of the ellipse

h Number

height (diameter) of the ellipse

transform(matrix) → {me.Polygon}

apply the given transformation matrix to this ellipse

Parameters:
Name Type Description
matrix me.Matrix2d

the transformation matrix

Returns:
me.Polygon -

Reference to this object for method chaining

translate(x, y) → {me.Ellipse}

translate the circle/ellipse by the specified offset

Parameters:
Name Type Description
x Number

x offset

y Number

y offset

Returns:
me.Ellipse -

this ellipse

translateV(v) → {me.Rect}

translate the circle/ellipse by the specified vector

Parameters:
Name Type Description
v me.Vector2d

vector offset

Returns:
me.Rect -

this ellipse

updateBounds() → {me.Rect}

update the bounding box for this shape.

Returns:
me.Rect -

this shape bounding box Rectangle object