import type { Canvas, Circle, Polygon, Polyline, RenderingPlugin, RenderingPluginContext } from '@antv/g-lite'; import EventEmitter from 'eventemitter3'; import { DrawerTool } from './constants/enum'; import type { BaseDrawer, DrawerState } from './interface/drawer'; import type { AnnotationPluginOptions } from './tokens'; /** * Provides drawing capability like free drawing mode in fabric.js. * @see http://fabricjs.com/freedrawing */ export declare class AnnotationPlugin implements RenderingPlugin { annotationPluginOptions: AnnotationPluginOptions; static tag: string; constructor(annotationPluginOptions: AnnotationPluginOptions); private hotkeyActive; drawer: BaseDrawer; emmiter: EventEmitter; canvas: Canvas; /** * draw a dashed rect when brushing */ brushRect: Polygon; /** * draw a static point */ pointCircle: Circle; /** * control points on polyline */ polylineControlPoints: Circle[]; /** * the whole polyline except for last segment */ savedPolyline: Polyline; /** * the last segment of polyline */ polylineLastSegment: Polyline; private hideDrawer; /** * 绘制标注 * @param anno */ renderDrawer(anno: DrawerState): void; /** * 激活标注 * @param id */ setActiveAnnotation: (id: string) => void; /** * 使用绘制工具 * @param tool * @param options * @returns */ setDrawer(tool: DrawerTool, options: any): BaseDrawer; /** * 清除绘制工具 */ clearDrawer(): void; apply(context: RenderingPluginContext): void; } //# sourceMappingURL=AnnotationPlugin.d.ts.map