You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.2 KiB
30 lines
1.2 KiB
import type { DisplayObjectConfig, PolygonStyleProps as GPolygonStyleProps, Group } from '@antv/g';
|
|
import { Polygon as GPolygon } from '@antv/g';
|
|
import type { Point } from '../../types';
|
|
import type { BaseNodeStyleProps } from '../nodes/base-node';
|
|
import { BaseNode } from '../nodes/base-node';
|
|
/**
|
|
* <zh/> 多边形节点样式配置项
|
|
*
|
|
* <en/> Polygon node style props
|
|
*/
|
|
export interface PolygonStyleProps extends BaseNodeStyleProps {
|
|
/**
|
|
* <zh/> 多边形的顶点坐标
|
|
*
|
|
* <en/> The vertex coordinates of the polygon
|
|
* @internal
|
|
*/
|
|
points?: ([number, number] | [number, number, number])[];
|
|
}
|
|
/**
|
|
* Abstract class for polygon nodes,i.e triangle, diamond, hexagon, etc.
|
|
*/
|
|
export declare abstract class Polygon<T extends PolygonStyleProps = PolygonStyleProps> extends BaseNode<T> {
|
|
constructor(options: DisplayObjectConfig<T>);
|
|
get parsedAttributes(): Required<T>;
|
|
protected drawKeyShape(attributes: Required<T>, container: Group): GPolygon | undefined;
|
|
protected getKeyStyle(attributes: Required<T>): GPolygonStyleProps;
|
|
protected abstract getPoints(attributes: Required<T>): Point[];
|
|
getIntersectPoint(point: Point, useExtendedLine?: boolean): Point;
|
|
}
|
|
|