import { MinMax } from "./minMax.js"; import { Point } from "./point.js"; /** * Get the central point (centroid) given a list of points. */ export declare function getCentroid(vertices: Array): Point; /** * Determine if a Point is within two Y coordinates. */ export declare function isPointInY(centroid: Point, yMin: number, yMax: number): boolean; /** * Get the maximum and minimum Y coordinates in a given list of Points. */ export declare function getMinMaxY(vertices: Array): MinMax; /** * Determine if a Point is within a Polygon's Y axis. */ export declare function isPointInPolygonY(centroid: Point, polygon: Array): boolean; /** * Calculate the relative Y position of a Polygon. * * Can be used to order (sort) words in the same column. */ export declare function relativeY(polygon: Array): number; /** * Determine if a Point is within two X coordinates. */ export declare function isPointInX(centroid: Point, xMin: number, xMax: number): boolean; /** * Get the maximum and minimum X coordinates in a given list of Points. */ export declare function getMinMaxX(vertices: Array): MinMax; /** * Determine if a Point is within a Polygon's X axis. */ export declare function isPointInPolygonX(centroid: Point, polygon: Array): boolean; /** * Calculate the relative X position of a Polygon. * * Can be used to order (sort) words in the same line. */ export declare function relativeX(polygon: Array): number; /** * Get the minimum Y coordinate in a given list of Points. * @param polygon An array of points or polygon. */ export declare function getMinYCoordinate(polygon: Array): number; /** * Get the minimum X coordinate in a given list of Points. * @param polygon An array of points or polygon. */ export declare function getMinXCoordinate(polygon: Array): number; /** * Compare two polygons on their minimum Y coordinate. * @param polygon1 An array of points or polygon. * @param polygon2 An array of points or polygon. */ export declare function compareOnY(polygon1: Array, polygon2: Array): number; /** * Compare two polygons on their minimum X coordinate. * @param polygon1 An array of points or polygon. * @param polygon2 An array of points or polygon. */ export declare function compareOnX(polygon1: Array, polygon2: Array): number; /** * Adjust a polygon for a given rotation. * @param polygon An array of points or polygon. * @param orientation The rotation angle in degrees. */ export declare function adjustForRotation(polygon: Array, orientation: number): Array;