import { IRectType, IUpdateNodeOpt, BaseNodeMapItem } from "../types"; import { EImageType, EPostMessageType, EScaleType, EToolsKey } from "../enum"; import { Point2d } from "../utils/primitives/Point2d"; import { BaseShapeOptions, BaseShapeTool, BaseShapeToolProps } from "./base"; import { VNodeManager } from "../vNodeManager"; import { ShapeNodes } from "./utils"; import type { LocalWorkForFullWorker } from "../worker/fullWorkerLocal"; import type { SubLocalMainThreadImpl } from "../mainThread/subLocalThread"; import type { SnapshotThreadImpl } from "../mainThread/snapshotThread"; import type { SubServiceMainThreadImpl } from "../mainThread/subServiceThread"; import { type WorkThreadEngineForFullWorker, type WorkThreadEngineForSimpleWorker, WorkThreadEngineForSubWorker } from "../worker/workerManager"; export interface ImageOptions extends BaseShapeOptions { /** 图片地址 */ src: string; /** 图片类型 */ type: EImageType; /** 图片的唯一识别符 */ uuid: string; /** 图片中点在世界坐标系中的 x 坐标 */ centerX: number; /** 图片中点在世界坐标系中的 y 坐标 */ centerY: number; /** 图片中点在世界坐标系中的宽 */ width: number; /** 图片中点在世界坐标系中的高 */ height: number; /** 图片是否被锁定 */ locked: boolean; /** 图片是否禁止非等比放缩 */ uniformScale?: boolean; /** 是否以跨域方式加载图片 */ crossOrigin?: boolean | string; } export declare class ImageShape extends BaseShapeTool { readonly canRotate: boolean; scaleType: EScaleType; readonly toolsType: EToolsKey; protected tmpPoints: Array; protected workOptions: ImageOptions; oldRect?: IRectType; constructor(props: BaseShapeToolProps); consume(): { type: EPostMessageType; }; consumeAll(): { type: EPostMessageType; }; private draw; consumeService(): IRectType | undefined; consumeServiceAsync(props: { isFullWork: boolean; worker: WorkThreadEngineForSimpleWorker | LocalWorkForFullWorker | WorkThreadEngineForFullWorker | WorkThreadEngineForSubWorker | SubLocalMainThreadImpl | SnapshotThreadImpl | SubServiceMainThreadImpl; replaceId?: string; }): Promise; clearTmpPoints(): void; static getScaleType(opt: ImageOptions): EScaleType.all | EScaleType.proportional; static updateNodeOpt(param: { node: ShapeNodes; opt: IUpdateNodeOpt; vNodes: VNodeManager; willSerializeData?: boolean; targetNode?: BaseNodeMapItem; }): IRectType | undefined; }