/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { IInkStroke } from "./interfaces"; /** * Ink snapshot interface. */ export interface ISerializableInk { /** * Collection of ink strokes. */ strokes: IInkStroke[]; /** * Stores a mapping from the provided key to its index in strokes. Since * ISerializableInk is serialized we need to use an index. */ strokeIndex: { [key: string]: number; }; } /** * Maintains a live record of the data that can be used for snapshotting. */ export declare class InkData { /** * {@inheritDoc ISerializableInk.strokes} */ private strokes; /** * {@inheritDoc ISerializableInk.strokeIndex} */ private strokeIndex; /** * Construct a new InkData. * @param snapshot - Existing data to initialize with */ constructor(snapshot?: ISerializableInk); /** * {@inheritDoc IInk.getStrokes} */ getStrokes(): IInkStroke[]; /** * {@inheritDoc IInk.getStroke} */ getStroke(key: string): IInkStroke; /** * Clear all stored data. */ clear(): void; /** * Add the given stroke to the stored data. * @param stroke - The stroke to add */ addStroke(stroke: IInkStroke): void; /** * Get a JSON-compatible representation of the stored data. * @returns The JSON-compatible object */ getSerializable(): ISerializableInk; } //# sourceMappingURL=snapshot.d.ts.map