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.

48 lines
1.5 KiB

4 months ago
import type { DisplayObjectConfig } from '@antv/g';
import type { PathArray } from '@antv/util';
import type { Point, PolylineRouter } from '../../types';
import type { BaseEdgeStyleProps } from './base-edge';
import { BaseEdge } from './base-edge';
/**
* <zh/> 线
*
* <en/> Polyline style properties
*/
export interface PolylineStyleProps extends BaseEdgeStyleProps {
/**
* <zh/>
*
* <en/> The radius of the rounded corner
* @defaultValue 0
*/
radius?: number;
/**
* <zh/>
*
* <en/> Control point array
*/
controlPoints?: Point[];
/**
* <zh/> controlPoints
*
* <en/> Whether to enable routing, it is enabled by default and controlPoints will be automatically included
* @defaultValue false
*/
router?: PolylineRouter;
}
type ParsedPolylineStyleProps = Required<PolylineStyleProps>;
/**
* <zh/> 线
*
* <en/> Polyline
*/
export declare class Polyline extends BaseEdge {
static defaultStyleProps: Partial<PolylineStyleProps>;
constructor(options: DisplayObjectConfig<PolylineStyleProps>);
protected getControlPoints(attributes: ParsedPolylineStyleProps): Point[];
protected getPoints(attributes: ParsedPolylineStyleProps): Point[];
protected getKeyPath(attributes: ParsedPolylineStyleProps): PathArray;
protected getLoopPath(attributes: ParsedPolylineStyleProps): PathArray;
}
export {};