import { type OxySize, type OxyThickness, type ScreenPoint } from '..'; /** * Describes the width, height, and point origin of a rectangle. */ export interface OxyRect { /** * The height of the rectangle. */ height: number; /** * The x-coordinate location of the left side of the rectangle. */ left: number; /** * The y-coordinate location of the top side of the rectangle. */ top: number; /** * The width of the rectangle. */ width: number; } export declare class OxyRectEx implements OxyRect { private readonly _rect; get rect(): OxyRect; get left(): number; get top(): number; get topLeft(): ScreenPoint; get topRight(): ScreenPoint; get right(): number; get bottom(): number; get bottomLeft(): ScreenPoint; get bottomRight(): ScreenPoint; get height(): number; get width(): number; get center(): ScreenPoint; offset(offsetX: number, offsetY: number): OxyRectEx; clip(clipRect: OxyRect): OxyRectEx; deflate(t: OxyThickness): OxyRectEx; constructor(rect: OxyRect); static fromRect(rect: OxyRect): OxyRectEx; static fromScreenPoints(p0: ScreenPoint, p1: ScreenPoint): OxyRectEx; } /** * Initializes a new instance of the `OxyRect` structure that has the specified x-coordinate, y-coordinate, width, and height. * @param left The x-coordinate location of the left side of the rectangle. * @param top The y-coordinate location of the top side of the rectangle. * @param width The width of the rectangle. * @param height The height of the rectangle. * @exception ArgumentOutOfRangeException * - width;The width should not be negative. * - height;The height should not be negative. */ export declare function newOxyRect(left: number, top: number, width: number, height: number): Readonly; /** * Gets an infinitely large `OxyRect` starting at (0,0). */ export declare const OxyRect_Everything: Readonly>; export declare const OxyRect_Empty: Readonly>; export declare class OxyRectHelper { /** * Initializes a new instance of the `OxyRect` struct that is exactly large enough to contain the two specified points. * @param p0 The first point that the new rectangle must contain. * @param p1 The second point that the new rectangle must contain. */ static fromScreenPoints(p0: ScreenPoint, p1: ScreenPoint): Readonly; /** * Initializes a new instance of the `OxyRect` struct by location and size. * @param p0 The location. * @param size The size. */ static fromScreenPointAndSize(p0: ScreenPoint, size: OxySize): Readonly; /** * Gets the y-axis value of the bottom of the rectangle. * @value The bottom. */ static bottom(r: OxyRect): number; /** * Gets the x-axis value of the right side of the rectangle. * @value The right. */ static right(r: OxyRect): number; /** * Gets the center point of the rectangle. * @value The center. */ static center(r: OxyRect): ScreenPoint; /** * Gets the top left corner of the rectangle. * @value The top left corner. */ static topLeft(r: OxyRect): ScreenPoint; /** * Gets the top right corner of the rectangle. * @value The top right corner. */ static topRight(r: OxyRect): ScreenPoint; /** * Gets the bottom left corner of the rectangle. * @value The bottom left corner. */ static bottomLeft(r: OxyRect): ScreenPoint; /** * Gets the bottom right corner of the rectangle. * @value The bottom right corner. */ static bottomRight(r: OxyRect): ScreenPoint; /** * Creates a rectangle from the specified corner coordinates. * @param x0 The x0. * @param y0 The y0. * @param x1 The x1. * @param y1 The y1. * @returns A rectangle. */ static create(x0: number, y0: number, x1: number, y1: number): OxyRect; /** * Determines whether the specified point is inside the rectangle. * @returns `true` if the rectangle contains the specified point; otherwise, `false`. */ static contains(r: OxyRect, x: number, y: number): boolean; /** * Determines whether the specified point is inside the rectangle. * @returns `true` if the rectangle contains the specified point; otherwise, `false`. */ static containsPoint(r: OxyRect, p: ScreenPoint): boolean; static equals(r: OxyRect, other: OxyRect): boolean; /** * Returns a rectangle that is expanded or shrunk by the specified width and height amounts, in all directions. * @param r * @param dx The amount by which to expand or shrink the left and right sides of the rectangle. * @param dy The amount by which to expand or shrink the top and bottom sides of the rectangle. * @returns The expanded/shrunk `OxyRect`. */ static inflate(r: OxyRect, dx: number, dy: number): OxyRect; /** * Returns a rectangle that is expanded by the specified thickness, in all directions. * @param r * @param t The thickness to apply to the rectangle. * @returns The inflated `OxyRect`. */ static inflateAll(r: OxyRect, t: OxyThickness): OxyRect; /** * Intersects this `OxyRect` with another `OxyRect`. * @param r * @param rect The other `OxyRect`. * @returns The intersection between this `OxyRect` and the other `OxyRect`. * @remarks If the two rectangles don't intersect, this returns an empty `OxyRect`. */ static intersect(r: OxyRect, rect: OxyRect): OxyRect; /** * Returns a rectangle that is shrunk by the specified thickness, in all directions. * @param r * @param t The thickness to apply to the rectangle. * @returns The deflated `OxyRect`. */ static deflate(r: OxyRect, t: OxyThickness): OxyRect; /** * Returns a rectangle that is moved by the specified horizontal and vertical amounts. * @param r * @param offsetX The amount to move the rectangle horizontally. * @param offsetY The amount to move the rectangle vertically. * @returns The moved `OxyRect`. */ static offset(r: OxyRect, offsetX: number, offsetY: number): OxyRect; /** * Returns a rectangle that is clipped to the outer bounds of the specified rectangle. * @param r * @param clipRect The rectangle that defines the outermost allowed coordinates for the clipped rectangle. * @returns The clipped rectangle. */ static clip(r: OxyRect, clipRect: OxyRect): OxyRect; } //# sourceMappingURL=OxyRect.d.ts.map