Polygon class
A polygon utility class.
Signature:
declare class Polygon
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructor. |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Polygon[] |
The primary polygon points. | |
|
|
Point[] |
The list of polygon holes. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
|
Suitable for use in Array.sort. | |
|
Check whether this polygon contains a point. | ||
|
Flip the Y coordinate for all points and holes. | ||
|
Get the area of the polygon. | ||
|
Get the bounding box of this polygon. | ||
|
Get the center of the bounding box. | ||
|
Check whether this polygon intersects with the given polygon. | ||
|
Merge a polygon with this polygon. | ||