import { Group } from "spritejs";
import { IMainThreadInitOption } from "./base";
import { MasterControlForWorker } from "../mainEngine";
import { IActiveToolsDataType, IBatchMainMessage, ICameraOpt, IRectType, IWorkerMessage } from "../types";
import type { BaseShapeTool } from "../tools/base";
import type { ImageShape } from "../tools/image";
import { TextShape } from "../tools/text";
export declare class SnapshotThreadImpl {
    viewId: string;
    fullLayer: Group;
    master: MasterControlForWorker;
    private opt;
    private scene;
    private mainThreadPostId?;
    private combinePostMsg;
    workShapes: Map<string, BaseShapeTool>;
    private cacheImages;
    private imageResolveMap;
    constructor(viewId: string, opt: IMainThreadInitOption);
    getCachedImages(imageSrc: string): ImageBitmap | undefined;
    getCachedImagesByWorkId(workId: string): ImageBitmap | undefined;
    deleteCachedImagesByWorkId(workId: string): void;
    clearCacheImages(): void;
    clearImageResolveMap(): void;
    post(msg: Omit<IBatchMainMessage, 'render'>): void;
    on(msg: IWorkerMessage): Promise<void>;
    private getIconSize;
    loadImageBitMap(msg: Pick<IWorkerMessage, 'toolsType' | 'opt' | 'workId'>): Promise<ImageBitmap | undefined>;
    createWorkShapeNode(opt: IActiveToolsDataType & {
        workId: string;
    }): import("../tools").ArrowShape | import("../tools").PencilShape | import("../tools/straight").StraightShape | import("../tools").EllipseShape | import("../tools").PolygonShape | import("../tools").StarShape | import("../tools").RectangleShape | import("../tools").SpeechBalloonShape | TextShape | import("../tools").LaserPenShape | import("../tools").EraserShape | import("../tools/pencilEraser").PencilEraserShape | import("../tools").BitMapEraserShape | import("../tools").SelectorShape | ImageShape | undefined;
    setFullWork(data: Pick<IWorkerMessage, 'workId' | 'opt' | 'toolsType'>): BaseShapeTool | undefined;
    runFullWork(data: IWorkerMessage): Promise<IRectType | undefined>;
    private getSnapshot;
    private getSceneRect;
    private getRectImageBitmap;
    private getSnapshotRender;
    private getBoundingRect;
    setCameraOpt(cameraOpt: ICameraOpt): void;
    private runBatchPostData;
    private combinePostData;
    combinePost(): void;
    private createScene;
    private createLayer;
    private updateScene;
    private updateLayer;
    destroy(): void;
}
