../../Developer.FoundationDotJS.org/wwwroot/Library/Foundation.Geometry.js
Foundation
Object
All Implemented Interfaces:
Foundation.Polygon
implementsFoundation.Class
Two dimensional polygon class, implemented as an array of Foundation.Point
s, though it is not a true Array.
Constructor Summary |
Creates a polygon from x and y pairs.
|
Creates a polygon from another polygon or
Array of Foundation.Point s. |
Field Summary | |
| length
The number of points in the polygon.
|
| rectangle
The bounding rectangle of all the points in the polygon.
|
Method Summary | |
|
Creates a copy of the polygon.
|
|
Checks to see if a point is inside the polygon.
|
|
|
Methods inherited from Foundation.Class |
getTypePath , isInstanceOf |
Constructor Detail |
Foundation.Polygon(/*Number
*/ x,
/*Number
*/ y,
...)
Creates a polygon from x and y pairs.
Parameters:x ⌉(Optional)(These 2 parameters in groups) The x,y verticies of the polygon.
y ⌋(Optional)(Repeatable group) The x,y verticies of the polygon.
Foundation.Polygon(/*Polygon
*/ polygon)
Creates a polygon from another polygon or Array
of Foundation.Point
s.
polygon -Polygon to copy.
Field Detail |
Number
length
The number of points in the polygon.
Rectangle
rectangle
The bounding rectangle of all the points in the polygon.
Method Detail |
Polygon
clone()
Creates a copy of the polygon.
Returns:
Boolean
containsPoint(/*Point
*/ point)
Checks to see if a point is inside the polygon.
Parameters:point -The point to check.
dispose()
dispose
in class Class