Ellipse

Kind of class:class
Inherits from:BaseShape < CoreObject
Version:08/02/07
Author:Aaron Clinger
Classpath:org.casaframework.math.geom.Ellipse
File last modified:Sunday, 19 August 2007, 13:43:31
Stores position and size of an ellipse (circle or oval).

Constructor

Ellipse

function Ellipse (x:Number, y:Number, width:Number, height:Number)
Creates new ellipse object.
Parameters:
x :
The horizontal position of the ellipse.
y :
The vertical position of the ellipse.
width :
Width of the ellipse at its widest horizontal point.
height:
[optional] Height of the ellipse at its tallest point. If undefined assumes height matches width (Creates circle).

Instance methods

clone

function clone () : Ellipse
Returns:
A new ellipse object with the same values as this ellipse.

containsPoint

function containsPoint (pointObject:Point) : Boolean

destroy

function destroy () : Void

equals

function equals (ellipseObject:Ellipse) : Boolean
Determines whether the ellipse specified in the ellipseObject parameter is equal to this ellipse object.
Parameters:
rectangleObject:
A defined Ellipse object.

getArea

function getArea () : Number

getPerimeter

function getPerimeter () : Number
Usage note:
Calculating the circumference of an ellipse is difficult; this is an approximation but should be fine for most cases.

getPointOfDegree

function getPointOfDegree (degree:Number) : Point
Finds the x, y position of the degree along the circumference of the ellipse.
Parameters:
degree:
Number representing a degree on the ellipse.
Returns:
A defined Point object.
Usage note:
degree can be over 360 or even negitive numbers; minding 0 = 360 = 720, 540 = 180, -90 = 270, etc...