Rect

Overview

Rect is a class in Aspose.3D FOSS for Typescript.

Rect.constructor creates a new rectangle with default position (0,0) and size (0,0).

Properties

NameTypeAccessDescription
widthnumberRead/WriteRepresents the rectangle’s width
heightnumberRead/Write
xnumberRead/WriteIs the x‑coordinate of the rectangle’s left edge
ynumberRead/WriteIs the y‑coordinate of the rectangle’s top edge
leftnumberRead
rightnumberReadReturns the x‑coordinate of the rectangle’s right edge (x + width)
topnumberRead
bottomnumberReadReturns the y‑coordinate of the rectangle’s bottom edge (y + height)

Methods

SignatureDescription
constructor()Creates a new rectangle with the given x, y, width, and height values
constructor(x: number, y: number, width: number, height: number)
constructor()
contains(x: number, y: number)booleanReturns true if the point (x, y) lies within the rectangle’s bounds

See Also