Point
Kind of class: | class |
---|---|
Inherits from: | CoreObject |
Implements: | |
Known subclasses: | |
Version: | 03/21/08 |
Author: | Aaron Clinger, David Bliss |
Classpath: | org.casalib.math.geom.Point |
File last modified: | Monday, 01 December 2008, 13:34:40 |
Stores location of a point in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.
Summary
Constructor
- Point (x:Number, y:Number)
- Creates point object.
Class methods
Instance methods
- getX : Number
- setX (x:Number) : Void
- Sets the X coordinate.
- getY : Number
- setY (y:Number) : Void
- Sets the Y coordinate.
- offset (x:Number, y:Number) : Void
- Offsets the Point object by the specified amount.
- rotate (pointObject:Point, angle:Number) : Void
- Rotate the Point object around another point by the specified angle.
- equals (pointObject:Point) : Boolean
- Determines whether the point specified in the pointObject parameter is equal to this point object.
- clone : Point
- destroy : Void
- Removes any internal variables, intervals, enter frames, internal MovieClips and event observers to allow the object to be garbage collected.Instance methods inherited from CoreObject
- offset (x:Number, y:Number) : Void
Constructor
Point
function Point (x:Number, y:Number)Creates point object.Parameters:x:The horizontal coordinate of the point.y:The vertical coordinate of the point.Class methods
angle
Determines the angle/degree between the first and second point.Parameters:firstPoint :The first point.secondPoint:The second point.Instance methods
destroy
function destroy () : VoidRemoves any internal variables, intervals, enter frames, internal MovieClips and event observers to allow the object to be garbage collected.#
Always callpointObject
before deleting last object pointer.Overrides:Specified by:equals
Determines whether the point specified in thepointObject
parameter is equal to this point object.Parameters:pointObject:A defined Point object.Returns:- Returns
true
if shape's location is identical; otherwisefalse
.
offset
function offset (x:Number, y:Number) : VoidOffsets the Point object by the specified amount.Parameters:x:The amount by which to offset the horizontal coordinate.y:The amount by which to offset the vertical coordinate.rotate
Rotate the Point object around another point by the specified angle.Parameters:pointObject:The Point to rotate this point around.angle :The angle (in degrees) to rotate this point.setX
function setX (x:Number) : VoidSets the X coordinate.#Parameters:x:The horizontal coordinate of the point.#Specified by: