UNPKG

553 BTypeScriptView Raw
1import Path, { PathProps } from '../Path';
2import { VectorArray } from '../../core/vector';
3export declare class PolygonShape {
4 points: VectorArray[];
5 smooth?: number;
6 smoothConstraint?: VectorArray[];
7}
8export interface PolygonProps extends PathProps {
9 shape?: Partial<PolygonShape>;
10}
11declare class Polygon extends Path<PolygonProps> {
12 shape: PolygonShape;
13 constructor(opts?: PolygonProps);
14 getDefaultShape(): PolygonShape;
15 buildPath(ctx: CanvasRenderingContext2D, shape: PolygonShape): void;
16}
17export default Polygon;