import type { Matrix, PathCommand, SceneShape } from "./scene.types.ts"; export declare const IDENTITY: Matrix; /** The matrix that does `b` first and then `a`'s frame: the transform of a child inside a parent. */ export declare const multiply: (a: Matrix, b: Matrix) => Matrix; /** The matrix that undoes `m`, or the identity when `m` flattens the plane. */ export declare function invert(m: Matrix): Matrix; export declare const isIdentity: (m: Matrix) => boolean; /** A point moved by a matrix. */ export declare const apply: (m: Matrix, x: number, y: number) => [number, number]; /** A `transform` attribute (`matrix`, `translate`, `scale`, `rotate`, in any run) as one matrix. */ export declare function parseTransform(text: string | undefined): Matrix; /** * Path data as absolute segments: `M`, `L`, `C`, `Q` and `Z`. Relative commands, `H`, `V`, `S` and `T` are worked out, and an arc is cubic curves. * @example * ```ts * import { pathCommands } from "@johnmorrisdotca/kyogijo-stadiums/scene"; * console.log(pathCommands("M0 0h10v5H0Z").map((c) => c.join(" "))); * // [ 'M 0 0', 'L 10 0', 'L 10 5', 'L 0 5', 'Z' ] * ``` */ export declare function pathCommands(d: string): PathCommand[]; /** The segments of a shape in its own frame: a rectangle, circle, ellipse, line, polygon, polyline or path as path commands. */ export declare function shapeCommands(shape: SceneShape): PathCommand[]; /** A run of points, and whether it was closed. */ export interface Ring { points: [number, number][]; closed: boolean; } /** * Segments as runs of points, curves cut into straight pieces no further than `tolerance` (in the same units) from the curve. `matrix` moves every * point first. */ export declare function flatten(commands: readonly PathCommand[], matrix?: Matrix, tolerance?: number): Ring[]; /** The box round a shape's outline (not its stroke) after `matrix`, or undefined for a shape with no points. */ export declare function boundsOf(shape: SceneShape, matrix?: Matrix): { x: number; y: number; w: number; h: number; } | undefined;