import { PaintCommandName } from "../../../../ImageViewer/Layers"; import { PointLocation } from "../../../../ImageViewer/Models"; import { PaintObjectDesigner } from "../../Objects/PaintObjectDesigner"; import { ObjectPaintCommandBase, PaintExecuteOptions } from "../PaintCommands"; /** * Base class for paint commands that create objects with toolbar state preservation. * Provides common functionality for object creation commands while maintaining * the toolbar state at the time of command creation. * * @template T - Type of the specific data required for the paint object creation */ export declare abstract class StatefulPaintObjectCommand extends ObjectPaintCommandBase { state: any; /** * The name of the paint command (must be set by derived classes) */ name: PaintCommandName; /** * The designer instance responsible for handling the paint object */ paintObjectDesigner: PaintObjectDesigner; /** * Creates a new stateful paint object command * @param objectId - object id * @param toolbar - Reference to the paint toolbar */ constructor(objectId: string, state: any); /** * Factory method to create the specific paint object * @param position - The position where the object should be created * @param state - The toolbar state at command creation time * @returns The created paint object instance */ abstract createPaintObject(position: PointLocation, state: any): any; /** * Executes the paint command by creating and registering the paint object * @param mainCtx - Main canvas rendering context * @param backCtx - Background canvas rendering context * @param options - Additional execution options */ execute(mainCtx: CanvasRenderingContext2D, backCtx: CanvasRenderingContext2D, options: PaintExecuteOptions): void; }