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 provides 2 methods for working with Rect objects in Typescript programs.
Available methods include: constructor, contains.
All 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.
Description
Rect is a class in the Aspose.3D FOSS library for TypeScript that exposes 1 method and 8 properties for programmatic use.
Core capabilities include: number; number; number. These operations enable developers to integrate rect functionality directly into TypeScript applications.
The class also provides the left property (gets the left), the right property (gets the right), the top property (gets the top).
The class offers 3 constructor overloads, allowing flexible initialization depending on the calling context.
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) | |
constructor() | |
contains(x: number, y: number) → boolean | Returns true if the point (x, y) lies within the rectangle’s bounds |