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).
This class declares 4 methods for Rect objects in TypeScript programs.
Available methods include: constructor, contains.
Public members are accessible to any TypeScript application after installing the Aspose.3D FOSS for TypeScript package.
Properties: bottom, height, left, right, top, width, and 2 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
width | number | Read/Write | Gets the width. |
height | number | Read/Write | Gets the height. |
x | number | Read/Write | Gets the x. |
y | number | Read/Write | Gets the y. |
left | number | Read | Gets the left. |
right | number | Read | Gets the right. |
top | number | Read | Gets the top. |
bottom | number | Read | Gets the bottom. |
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) | Calls constructor(x, y, width, height) on this Rect instance. |
constructor() | |
contains(x: number, y: number) → boolean | Returns true if the point (x, y) lies within the rectangle’s bounds |