import type { Label } from "../render/Label"; import type { Root } from "../Root"; import type { Text } from "../render/Text"; import type { IBounds } from "./IBounds"; import type { IPoint } from "./IPoint"; /** * Sets a setting as computed, or takes it back with `undefined`. A value the * author set on the element itself is left alone. Returns whether it changed. * * @ignore */ export declare function setFit(entity: any, key: string, value: any, tolerance?: number): boolean; /** * A text's lines as last laid out: the widest, all widths together, the * tallest, all heights together, and how many. * * @ignore */ export declare function lineSizes(text: Text): { widest: number; width: number; tallest: number; height: number; count: number; }; /** * Fitting passes skip frames within half a second of their last pass. A frame * one of them skipped asks for one more frame, in which every pass of the root * runs: it starts a new `Root._passRound`. * * @ignore */ export declare function passLater(root: Root, delay: number): void; /** * What a label's text was measured in: its font, and the web fonts loaded since. * * @ignore */ export declare function fontKey(label: Label): string; /** * Whether two boxes overlap by more than half a pixel. * * @ignore */ export declare function overlap(a: IBounds, b: IBounds): boolean; /** * Whether a box is inside another, give or take a pixel. * * @ignore */ export declare function inside(box: IBounds, area: IBounds): boolean; /** * Keeps the labels its owner hid for not fitting, with the box and place they * had, and tells when one would fit again. * * @ignore */ export declare class LabelFit { out: { [uid: number]: { label: Label; box: IBounds; x: number; y: number; text: string; w: number; h: number; font: string; }; }; protected _suspects: { [uid: number]: IPoint; }; protected _next: { [uid: number]: IPoint; }; /** * Checks a label: `box` is where it is drawn, if it is. Returns 1 when it is * to be hidden, -1 when it is to be shown again, 0 otherwise. `populate` reads * its text anew, which is slow, for a label whose drawn text may be out of date. */ check(label: Label, box: IBounds | undefined, fits: (box: IBounds) => boolean, populate?: boolean): number; /** * Ends a pass. Returns whether a label waits for one more pass to be hidden. */ end(): boolean; } //# sourceMappingURL=Fit.d.ts.map