/**
 * An immutable rectangle with a scene-graph -like hierarchy.
 * Allows for implementing scrolling viewports etc.
 *
 * @typedef {("x" | "y" | "width" | "height")} Prop
 * @typedef {import("./padding.js").default } Padding
 * @typedef {() => number} Accessor
 */
export default class Rectangle {
    /**
     *
     * @param {number} x
     * @param {number} y
     * @param {number} width
     * @param {number} height
     */
    static create(x: number, y: number, width: number, height: number): Rectangle;
    static ZERO: Rectangle;
    /**
     *
     * @param {Accessor} x
     * @param {Accessor} y
     * @param {Accessor} width
     * @param {Accessor} height
     */
    constructor(x: Accessor, y: Accessor, width: Accessor, height: Accessor);
    /**
     * @param {Prop} prop
     * @param {number | function():number} value
     * @returns {Accessor}
     */
    _offset(prop: Prop, value: number | (() => number)): Accessor;
    /**
     * @param {Prop} prop
     */
    _passThrough(prop: Prop): Accessor;
    /** @readonly */ readonly _x: Accessor;
    /** @readonly */ readonly _y: Accessor;
    /** @readonly */ readonly _width: Accessor;
    /** @readonly */ readonly _height: Accessor;
    /**
     * @returns {number}
     */
    get x(): number;
    /**
     * @returns {number}
     */
    get y(): number;
    /**
     * @returns {number}
     */
    get width(): number;
    /**
     * @returns {number}
     */
    get height(): number;
    get x2(): number;
    get y2(): number;
    /**
     * Returns true if the given rectangle is the same or equal rectangle.
     *
     * @param {Rectangle} rectangle
     */
    equals(rectangle: Rectangle): boolean;
    /**
     *
     * @param {Partial<Record<Prop, number | function():number>>} props
     */
    modify(props: Partial<Record<Prop, number | (() => number)>>): Rectangle;
    /**
     *
     * @param {number | function():number} x
     * @param {number | function():number} y
     */
    translate(x: number | (() => number), y: number | (() => number)): Rectangle;
    /**
     * Returns a copy of this rectangle translated by the given rectangle.
     *
     * @param {Rectangle} rectangle
     */
    translateBy(rectangle: Rectangle): Rectangle;
    /**
     *
     * @param {Padding} padding
     */
    expand(padding: Padding, direction?: number): Rectangle;
    /**
     *
     * @param {Padding} padding
     */
    shrink(padding: Padding): Rectangle;
    /**
     * Returns an intersection of this and the other rectangle.
     *
     * @param {Rectangle} rectangle
     */
    intersect(rectangle: Rectangle): Rectangle;
    /**
     * Returns an union of this and the other rectangle.
     *
     * @param {Rectangle} rectangle
     */
    union(rectangle: Rectangle): Rectangle;
    /**
     * Returns true if width and height are greater than equal to zero.
     */
    isDefined(): boolean;
    /**
     * Returns a flattened rectangle, i.e., drops the hierarchy and materializes
     * the parameters.
     */
    flatten(): Rectangle;
    /**
     * Tests whether the rectangle contains the given point. Uses half open intervals.
     *
     * @param {number} x
     * @param {number} y
     */
    containsPoint(x: number, y: number): boolean;
    /**
     * Normalizes a point with respect to this rectangle
     *
     * @param {number} x
     * @param {number} y
     * @param {boolean} [flipY]
     */
    normalizePoint(x: number, y: number, flipY?: boolean): {
        x: number;
        y: number;
    };
    /**
     * @param {number} x
     * @param {number} y
     * @param {boolean} flipY
     */
    denormalizePoint(x: number, y: number, flipY?: boolean): {
        x: number;
        y: number;
    };
    toString(): string;
    toRoundedString(): string;
}
/**
 * An immutable rectangle with a scene-graph -like hierarchy.
 * Allows for implementing scrolling viewports etc.
 */
export type Prop = ("x" | "y" | "width" | "height");
/**
 * An immutable rectangle with a scene-graph -like hierarchy.
 * Allows for implementing scrolling viewports etc.
 */
export type Padding = import("./padding.js").default;
/**
 * An immutable rectangle with a scene-graph -like hierarchy.
 * Allows for implementing scrolling viewports etc.
 */
export type Accessor = () => number;
//# sourceMappingURL=rectangle.d.ts.map