import { type Outline } from "./outline.ts"; import type { Surface } from "./surfaces/surface.ts"; import type { HostOptions, Placement, Sport, SurfaceOptions } from "./types.ts"; /** The host as options for a surface of its own: the options `outlineOf` and the drawing take. */ export declare function hostSurfaceOptions(host: HostOptions, o: Pick): SurfaceOptions | undefined; /** The host's outline in its frame, in feet. */ export declare function hostOutline(host: HostOptions, o: Pick): Outline; /** The sport of the host as the drawing's palette knows it. */ export declare function hostSport(host: HostOptions): Sport | "deck"; /** A ballpark's infield is a square 90 feet on a side: its middle is where the line from first base to third crosses the line from home plate to second. */ export declare const INFIELD_CENTRE: number; /** The point of the guest that is put at the placement's `x` and `y`: the middle of the playing surface, and for a ballpark home plate. */ export declare function guestAnchor(o: Pick): { x: number; y: number; }; /** * Where the guest stands when the options do not say: the middle of the host's field, with the guest as it lies; the middle of a ballpark's infield; for a * ballpark set inside another surface, its infield's middle on the middle of the host. */ export declare function defaultPlacement(o: SurfaceOptions): Placement; /** The placement the options ask for, with a part it leaves out filled from the default. */ export declare function placementOf(o: SurfaceOptions): Placement; /** The point of the guest's own frame at the host's, for a placement. */ export declare function guestToHost(o: SurfaceOptions, p: Placement): (x: number, y: number) => [number, number]; /** The transform that does the same, as SVG writes it. */ export declare function guestTransform(o: SurfaceOptions, p: Placement): string; /** How a guest sits in its host: the share of the guest's surface that lies outside the host's outline, from 0 (wholly inside) to 1. */ export interface Fit { /** True when every point of the guest's surface is inside the host's outline. */ inside: boolean; /** The share of the guest's area outside the host's outline, to a thousandth. */ outside: number; } /** * How the guest sits in its host, worked out on a grid over the guest's outline (a rink's rounded corners and a fence's curve are the guest's own). * For a ballpark the host's outline is the fair ground inside the fence: a rink across the infield reaches into foul ground, which this reports as outside. */ export declare function fitOf(o: SurfaceOptions): Fit; /** * The host and the guest as one surface. `guest` is the drawing's own surface, built wide with no margin; `build` draws the host as a surface of its own. * The result has the host's frame, the guest's team places and score moved onto the guest, and `frame`, the transform the guest's data goes through. */ export declare function composeSpecial(o: SurfaceOptions, guest: Surface, build: (options: SurfaceOptions, id: string) => Surface, id: string): Surface;