import { type KyogijoWords } from "./strings.ts"; import { type Surface } from "./surfaces/surface.ts"; import type { ScoreOptions, SurfaceOptions } from "./types.ts"; /** The margin each surface has when the options give none (the builders' own defaults), in feet. */ export declare const DEFAULT_MARGIN: Readonly>; /** What the annotations are drawn against. */ export interface NoteEnv { o: SurfaceOptions | ScoreOptions; surface: Surface; turned: boolean; /** The language's words. */ words: KyogijoWords; /** The teams' names for a label, in a score drawing. */ teams: { home?: string; away?: string; }; } /** What the annotations made. */ export interface Notes { /** SVG for the surface's group, in its wide frame. */ svg: string; /** Sentences for the description. */ summaries: string[]; /** The margin, in feet, that the annotations need all round: the drawing is made at least this wide. */ need: number; } /** The surface's wide frame view: the drawing's viewBox as the surface lies wide, which for a turned surface is found again from its turn. */ export declare function wideView(surface: Surface): { x: number; y: number; w: number; h: number; }; type P = readonly [number, number]; /** Where a direction in the wide frame points on the screen: a quarter turn clockwise sends `(dx, dy)` to `(-dy, dx)`. */ export declare const onScreen: (turned: boolean, [dx, dy]: P) => P; /** A round step that gives about `count` ticks over a span. */ export declare function niceStep(span: number, count?: number): number; /** True when the options ask for any annotation. */ export declare const annotated: (o: SurfaceOptions | ScoreOptions) => boolean; /** * The annotations of a drawing: their SVG in the surface's wide frame, a sentence for each for the description, and the margin they need. `need` is * measured from the surface's edge, so a caller who finds it larger than the margin the surface has draws the surface again with it. */ export declare function annotate(env: NoteEnv): Notes; export {};