/** * An object that describes 4 corner values of a quadrilateral. * * This object is almost identical in functionality to a quadrilateral, * but is mostly useful for semantics. * * @param T - * The type of data to associate to each corner. */ export interface IZQuadrilateralCorners { bottomLeft: T; bottomRight: T; topLeft: T; topRight: T; } /** * A type that describes quadrilateral corners on the vertical axis. */ export type ZCornersVertical = { bottom?: T; top?: T; }; /** * A type that describes quadrilateral corners on the horizontal axis. */ export type ZCornersHorizontal = { left?: T; right?: T; }; /** * An value that a corners object can be built upon. */ export type ZQuadrilateralCornersLike = T | ZCornersVertical | ZCornersHorizontal | Partial> | null | undefined; /** * An object that can be used to build an {@link IZQuadrilateralCorners} object. * * @param T - * The type of data to associate to each corner. */ export declare class ZQuadrilateralCornersBuilder { private _corners; constructor(start: T); /** * Sets the bottom left corner value. * * @param value - * The value to set. * * @returns * This object. */ bottomLeft(value: T): this; /** * Sets the bottom right corner value. * * @param value - * The value to set. * * @returns * This object. */ bottomRight(value: T): this; /** * Sets the top left corner value. * * @param value - * The value to set. * * @returns * This object. */ topLeft(value: T): this; /** * Sets the top right corner value. * * @param value - * The value to set. * * @returns * This object. */ topRight(value: T): this; /** * Sets the bottom left and bottom right values. * * @param value - * The value for bottom left and bottom right. * * @returns * This object. */ bottom(value: T): this; /** * Sets the bottom left and top left values. * * @param value - * The value for bottom left and top left. * * @returns * This object. */ left(value: T): this; /** * Sets the bottom right and top right values. * * @param value - * The value for bottom right and top right. * * @returns * This object. */ right(value: T): this; /** * Sets the top left and top right values. * * @param value - * The value for top left and top right. * * @returns * This object. */ top(value: T): this; /** * Sets the corner values based on an object that * describes a set of quadrilateral corners. * * @param other - * The object that describes the corners. * * @returns * This object. */ from(other: ZQuadrilateralCornersLike): this; /** * Copies another corners object into this builder. * * @param other - * The corners object to copy. * * @returns * This object. */ copy(other: IZQuadrilateralCorners): this; /** * Builds the corners. * * @returns * The built corners. */ build(): IZQuadrilateralCorners; }