UNPKG

mindee

Version:

Mindee Client Library for Node.js

28 lines (27 loc) 801 B
import { Point } from "./point.js"; import { MinMax } from "./minMax.js"; /** 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; toString(): string; }