mindee
Version:
Mindee Client Library for Node.js
27 lines (26 loc) • 771 B
TypeScript
import { Point } from "./point";
import { MinMax } from "./minMax";
/** A polygon, composed of several Points. */
export declare class Polygon extends Array<Point> {
constructor(...args: Point[]);
/**
* Get the central point (centroid) of the polygon.
*/
getCentroid(): Point;
/**
* Get the maximum and minimum X coordinates of the polygon.
*/
getMinMaxX(): MinMax;
/**
* Get the maximum and minimum Y coordinates of the polygon.
*/
getMinMaxY(): MinMax;
/**
* Determine if a Point is within the Polygon's X axis (same column).
*/
isPointInX(point: Point): boolean;
/**
* Determine if a Point is within the Polygon's Y axis (same line).
*/
isPointInY(point: Point): boolean;
}