import type { ShadowContainer } from '../widget/shadow.js'; import type { Annotation } from '../types.js'; import type { ScrollOffset } from '../screenshot/geometry.js'; export declare class DrawLayer { private svg; private currentPath; private currentPoints; private currentAnchor; private isDrawing; private committed; private redoStack; constructor(shadow: ShadowContainer); startDraw(x: number, y: number): void; continueDraw(x: number, y: number): void; /** * How far the pointer has wandered from where it went down, in pixels. * * This is what separates a tap from a stroke. Counting points cannot: a * mouse click reports no movement at all, while a finger reports a burst of * sub-pixel jitter, so any point-based threshold reads every tap on a phone * as a drawing. */ getCurrentSpan(): number; commitStroke(): boolean; cancelCurrentDraw(): void; undo(): boolean; redo(): boolean; canUndo(): boolean; canRedo(): boolean; hasStrokes(): boolean; getAnnotation(): Annotation | null; /** * How far the drawing's frame has drifted from the live viewport, so a caller * can map a point in the drawing back onto the page as it stands now — which * is what hit-testing the drawing's target needs. */ viewportDrift(): ScrollOffset; clearAll(): void; isCurrentlyDrawing(): boolean; destroy(): void; private createPath; } //# sourceMappingURL=draw.d.ts.map