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
| Name | Type | Access | Description |
|---|---|---|---|
width | number | Read/Write | Represents the rectangle’s width |
height | number | Read/Write | |
x | number | Read/Write | Is the x‑coordinate of the rectangle’s left edge |
y | number | Read/Write | Is the y‑coordinate of the rectangle’s top edge |
left | number | Read | |
right | number | Read | Returns the x‑coordinate of the rectangle’s right edge (x + width) |
top | number | Read | |
bottom | number | Read | Returns the y‑coordinate of the rectangle’s bottom edge (y + height) |
Methods
| Signature | Description |
|---|---|
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) → boolean | Returns true if the point (x, y) lies within the rectangle’s bounds |