@antv/s2
Version:
effective spreadsheet render core lib
36 lines (35 loc) • 1.36 kB
TypeScript
import type { DataCell } from '../../cell';
/**
* according to the coordinates of the starting point of the rectangle,
* return the four sides of the rectangle in a clockwise direction.
* [TopLeft] --- [TopRight]
* | |
* [BottomLeft] -[BottomRight]
* @param x
* @param y
* @param width
* @param height
*/
export declare const getRectangleEdges: (x: number, y: number, width: number, height: number) => [number, number][][];
/**
* return the edges without overlapping edges
* @param edges the collection of edges
*/
export declare const unique: (edges: [number, number][][]) => [number, number][][];
/**
* return the edge according to the coordinate of current edge
* eg: curEdge: [[0,0], [100,0]] then the next edge: [[100, 0 ], [100, 100]]
* @param curEdge the coordinate of current edge
* @param edges the collection of edges
*/
export declare const getNextEdge: (curEdge: [number, number][], edges: [number, number][][]) => [number, number][] | undefined;
/**
* return all the points of the polygon
* @param cells the collection of information of cells which needed be merged
*/
export declare const getPolygonPoints: (cells: DataCell[]) => [number, number][];
export declare const getRightAndBottomCells: (cells: DataCell[]) => {
bottom: DataCell[];
right: DataCell[];
bottomRightCornerCell: DataCell[];
};