Class: Ellipse

me. Ellipse

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
Source:
ellipse.js, line 19

Extends

Members

<private, static> _bounds :me.Rect

The bounding rectangle for this shape
Type:
Source:
ellipse.js, line 33

<static> pos :me.Vector2d

the center coordinates of the ellipse
Type:
Source:
ellipse.js, line 24

<static> radius :Number

Maximum radius of the ellipse
Type:
  • Number
Source:
ellipse.js, line 42

<static> radiusSq :me.Vector2d

Radius squared, for pythagorean theorom
Type:
Source:
ellipse.js, line 60

<static> radiusV :me.Vector2d

Pre-scaled radius vector for ellipse
Type:
Source:
ellipse.js, line 51

<static> ratio :me.Vector2d

x/y scaling ratio for ellipse
Type:
Source:
ellipse.js, line 69

Methods

<static> clone() → {me.Ellipse}

clone this Ellipse
Source:
ellipse.js, line 259
Returns:
new Ellipse
Type
me.Ellipse

<static> 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
Source:
ellipse.js, line 205
Returns:
true if contains
Type
boolean

<static> containsPointV(point) → {boolean}

check if this circle/ellipse contains the specified point
Parameters:
Name Type Description
point me.Vector2d
Source:
ellipse.js, line 193
Returns:
true if contains
Type
boolean

<static> getBounds() → {me.Rect}

returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
Source:
ellipse.js, line 225
Returns:
this shape bounding box Rectangle object
Type
me.Rect

<static> 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)
Source:
ellipse.js, line 106
Returns:
Reference to this object for method chaining
Type
me.Ellipse

<static> scale(x, y) → {me.Ellipse}

Scale this Ellipse by the specified scalar.
Parameters:
Name Type Argument Default Description
x Number
y Number <optional>
x
Source:
ellipse.js, line 119
Returns:
Reference to this object for method chaining
Type
me.Ellipse

<static> scale(v) → {me.Ellipse}

Scale this Ellipse by the specified vector.
Parameters:
Name Type Description
v me.Vector2d
Source:
ellipse.js, line 138
Returns:
Reference to this object for method chaining
Type
me.Ellipse

<static> 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
Source:
ellipse.js, line 83

<static> transform(matrix) → {me.Polygon}

apply the given transformation matrix to this ellipse
Parameters:
Name Type Description
matrix me.Matrix2d the transformation matrix
Source:
ellipse.js, line 150
Returns:
Reference to this object for method chaining
Type
me.Polygon

<static> 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
Source:
ellipse.js, line 163
Returns:
this ellipse
Type
me.Ellipse

<static> translateV(v) → {me.Rect}

translate the circle/ellipse by the specified vector
Parameters:
Name Type Description
v me.Vector2d vector offset
Source:
ellipse.js, line 179
Returns:
this ellipse
Type
me.Rect

<static> updateBounds() → {me.Rect}

update the bounding box for this shape.
Source:
ellipse.js, line 236
Returns:
this shape bounding box Rectangle object
Type
me.Rect
Copyright © 2011 - 2017, Olivier Biot, Jason Oster, Aaron McLeod
Documentation generated by JSDoc 3.4.0 on 2017-02-28T11:37:40+08:00 using the DocStrap template modified by codename-.