/** * Paint Stroke * * Records brush strokes for undo/redo and real-time updates. * Each stroke tracks changed pixels for efficient undo. */ import { ColorRGBA } from './painter'; export interface PixelChange { x: number; y: number; oldColor: ColorRGBA; newColor: ColorRGBA; } export interface PaintStroke { textureUuid: string; layerUuid?: string; changes: PixelChange[]; startTime: number; endTime?: number; } /** * Paint stroke recorder for undo support */ export declare class PaintStrokeRecorder { private currentStroke; private strokes; /** * Start recording a new stroke */ startStroke(textureUuid: string, layerUuid?: string): void; /** * Record a pixel change */ recordPixelChange(x: number, y: number, oldColor: ColorRGBA, newColor: ColorRGBA): void; /** * Finish recording current stroke */ finishStroke(): PaintStroke | null; /** * Cancel current stroke */ cancelStroke(): void; /** * Get current stroke */ getCurrentStroke(): PaintStroke | null; /** * Get all strokes */ getStrokes(): PaintStroke[]; /** * Clear all strokes */ clear(): void; /** * Get undo data for a stroke * Returns pixel changes that can be used to restore previous state */ getUndoData(stroke: PaintStroke): PixelChange[]; } //# sourceMappingURL=paint_stroke.d.ts.map