import { Insets, LayoutRect } from '../kernel'; /** Box in chart coordinates. */ export interface Bounds { left: number; right: number; top: number; bottom: number; } export declare const NO_OVERFLOW: Insets; /** * Box a text node covers. The glyph row is taken as one font size tall — * a hair more than the letters really are, which is the safe side to err on. * `rotation` turns the text about its anchor, degrees clockwise, as the scene * draws it; the box is then the upright one the turned row fits into. */ export declare function textBounds(x: number, y: number, width: number, fontSize: number, align: CanvasTextAlign, baseline: CanvasTextBaseline, rotation?: number): Bounds; /** How far the box sticks out of the rect, side by side (0 where it fits). */ export declare function overflowOutside(bounds: Bounds, rect: LayoutRect): Insets; /** Side-by-side maximum: two demands for outside room merge into one. */ export declare function maxOverflow(a: Insets, b: Insets): Insets;