import type { Point } from '../types/geometry.js'; /** A dash pattern ready to walk, and where its offset leaves the walk at the first point. */ export interface Dash { dashes: number[]; index: number; remaining: number; on: boolean; } /** * A pattern as canvas's setLineDash reads it, prepared once for every contour * it is walked along: an odd-length pattern repeats to make it even, and the * offset skips into the pattern before the first point. Null when it draws * solid. * * `bridge` is how much of a gap the caps at two facing run ends close between * them, which is the stroke width for a square cap and nothing for the others. * See bridgeGaps. */ export declare function prepareDash(pattern: number[], offset?: number, bridge?: number): Dash | null; /** * Splits a polyline into the drawn runs of a dash, one polyline per run, so * callers can render them as ordinary line segments. */ export declare function dashPolyline(points: readonly Point[], dash: Dash): Point[][]; export declare function samePoint(a: Point, b: Point): boolean;