import type { AthleticsMark, SkatingMark, BudoMark, ArcShape, BarShape, BoxShape, Dash, DotShape, LineShape, Outline, PathShape, PolyShape, RingShape } from "./fields.types.ts"; import type { Span } from "./leagues/fields.ts"; import { type PlateSpot, type Zone } from "./surfaces/surface.ts"; import type { Box } from "./types.ts"; import { type Unit } from "./units.ts"; interface Style { w?: number; dash?: Dash; /** The least this shape is drawn at, in feet, when the drawing is not at the true widths (a crease on a pitch has to stay thin beside a ground). */ least?: number; cls?: "ky-line" | "ky-red" | AthleticsMark | SkatingMark | BudoMark; } /** A line from one point to another. */ export declare const line: (id: string, feature: string, x0: number, y0: number, x1: number, y1: number, style?: Style) => LineShape; /** The outline of a rectangle from its corners. */ export declare const box: (id: string, feature: string, x0: number, y0: number, x1: number, y1: number, style?: Style) => BoxShape; /** A circle or an ellipse as a line. */ export declare const ring: (id: string, feature: string, cx: number, cy: number, rx: number, ry?: number, style?: Style) => RingShape; /** An arc of a circle, the angles in degrees from the right, growing clockwise as the eye sees it. */ export declare const arc: (id: string, feature: string, cx: number, cy: number, r: number, a0: number, a1: number, style?: Style) => ArcShape; /** A straight-sided line through points. */ export declare const poly: (id: string, feature: string, points: readonly (readonly [number, number])[], style?: Style & { closed?: boolean; }) => PolyShape; /** A line along a path of your own. */ export declare const path: (id: string, feature: string, d: string, style?: Style) => PathShape; /** A small filled mark. */ export declare const dot: (id: string, feature: string, cx: number, cy: number, r: number, paint?: DotShape["paint"]) => DotShape; /** A filled rectangle in the line's colour. */ export declare const bar: (id: string, feature: string, x0: number, y0: number, x1: number, y1: number) => BarShape; /** Dashes along a line from `from` to `to` (a line along x, at height `y`), each `on` long, starting with a dash at `from`, the pattern repeating every `on + off`. */ export declare function dashesAlongX(id: string, feature: string, y: number, from: number, to: number, on: number, off: number, style?: Style): LineShape[]; /** Dashes along a line from `from` to `to` (a line along y, at `x`), each `on` long, starting with a dash at `from`, the pattern repeating every `on + off`. */ export declare function dashesAlongY(id: string, feature: string, x: number, from: number, to: number, on: number, off: number, style?: Style): LineShape[]; /** The path of a rounded rectangle from its corners. */ export declare function roundedD(x0: number, y0: number, x1: number, y1: number, r: number): string; /** The path of the playing surface's edge, in a box of `length` by `width` feet. */ export declare function outlineD(length: number, width: number, outline: Outline): string; /** True when a point is on the playing surface or on its edge. */ export declare function inOutline(length: number, width: number, outline: Outline, x: number, y: number): boolean; /** A metre, in feet. */ export declare const METRE: number; /** A yard, in feet. */ export declare const YARD = 3; /** An inch, in feet. */ export declare const INCH: number; /** A length in feet to the unit asked for (for a test, and for a sentence). */ export declare const inUnit: (feet: number, unit: Unit) => number; /** * A size asked for in `askedUnit`, held to the range the rules allow. The range is in feet, as a plan's figures are; the answer is in feet, and without a size asked for it is the one drawn. * @throws RangeError with the range in `reportUnit` (the league's own) when the size is outside it. */ export declare function sizeIn(range: Span, asked: number | undefined, askedUnit: Unit, reportUnit: Unit, label: string): number; /** The zones that hold the teams' names at each end, lying along the end (the words run up the left end and down the right, as a football end zone's do). */ export declare function endZones(length: number, width: number, depth: number, across: number): { left: Zone; right: Zone; }; /** The place of the score's panel: the middle of the surface, of a size that follows the surface's. */ export declare function middlePlate(length: number, width: number, w: number, h: number): PlateSpot; /** A box from two corners. */ export declare const at: (x0: number, y0: number, x1: number, y1: number) => Box; export {};