import type { Gradient } from '../types/slides'; export declare const DEFAULT_FREEHAND_SIZE = 6; export type FreehandPoint = { x: number; y: number; pressure?: number; }; export type FreehandCapOptions = { cap?: boolean; taper?: number | boolean; }; export type FreehandStrokeOptions = { last?: boolean; thinning?: number; simulatePressure?: boolean; streamline?: number; smoothing?: number; start?: FreehandCapOptions; end?: FreehandCapOptions; }; export declare const shouldKeepFreehandPoint: (from: FreehandPoint, to: FreehandPoint, simulatePressure?: boolean) => boolean; /** * Keep raw pointer spacing. Evenly interpolating jumps flattens velocity, which * is what perfect-freehand uses to simulate pressure. */ export declare const appendFreehandPoint: (points: FreehandPoint[], next: FreehandPoint, simulatePressure?: boolean) => void; export declare const shouldSimulatePressure: (e: PointerEvent) => boolean; export declare const readPointerPressure: (e: PointerEvent) => number; export declare const pointerStrokeSamples: (e: PointerEvent) => PointerEvent[]; /** * Excalidraw's outline → SVG path: quadratic midpoints, then close. * See getSvgPathFromStroke in packages/element/src/shape.ts. */ export declare const getSvgPathFromStroke: (points: number[][]) => string; export declare const getFreehandOutline: (points: FreehandPoint[], size: number, options?: FreehandStrokeOptions) => import("perfect-freehand").Vec2[]; export declare const getFreehandSvgPath: (points: FreehandPoint[], size: number, options?: FreehandStrokeOptions) => string; export declare const getFreehandPath: (points: FreehandPoint[], size: number, options?: FreehandStrokeOptions) => Path2D; export type FreehandShapeGeometry = { path: string; viewBox: [number, number]; minX: number; minY: number; maxX: number; maxY: number; }; export declare const getFreehandShapeGeometry: (points: FreehandPoint[], size: number, options?: FreehandStrokeOptions, minViewBox?: number) => FreehandShapeGeometry | null; export declare const joinFreehandStrokes: (strokes: Array<{ points: FreehandPoint[]; size: number; options?: FreehandStrokeOptions; }>, minViewBox?: number) => FreehandShapeGeometry | null; export declare const joinFreehandOutlines: (outlines: number[][][], minViewBox?: number) => FreehandShapeGeometry; export declare const fillFreehandStroke: (ctx: CanvasRenderingContext2D, points: FreehandPoint[], size: number, color: string, options?: FreehandStrokeOptions & { alpha?: number; composite?: GlobalCompositeOperation; gradient?: Gradient; }) => void;