import { default as Konva } from 'konva'; import { Shape } from '../types/annotation.types'; import { PixelSize } from './scaling'; /** * Owns the Konva Stage and its layers for shape rendering. * * - `shapesLayer` holds finalized annotation shapes. * - `previewLayer` holds the in-progress shape while drawing (Phase 2). * * Pins are rendered as DOM elements outside Konva (see pin-layer.ts); this * engine is concerned only with the canvas shape overlay. */ export declare class CanvasEngine { readonly stage: Konva.Stage; readonly shapesLayer: Konva.Layer; readonly previewLayer: Konva.Layer; private size; constructor(container: HTMLDivElement, size: PixelSize); /** Resize the stage and re-render shapes at the new pixel size. */ resize(size: PixelSize, shapes: Shape[]): void; /** Clear and re-render all finalized shapes. */ renderShapes(shapes: Shape[]): void; /** Render (or clear) the in-progress shape on the preview layer. */ renderPreview(shape: Shape | null): void; /** Current pixel size of the stage. */ getSize(): PixelSize; /** Tear down the Konva stage and free resources. */ destroy(): void; } //# sourceMappingURL=canvas-engine.d.ts.map