../../Developer.FoundationDotJS.org/wwwroot/Library/Foundation.Geometry.jsFoundationObject
All Implemented Interfaces:
Foundation.Polygon
implementsFoundation.Class
Two dimensional polygon class, implemented as an array of Foundation.Points, 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.Points. |
| 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.Points.
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