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

NameTypeAccessDescription
widthnumberRead/WriteGets the width.
heightnumberRead/WriteGets the height.
xnumberRead/WriteGets the x.
ynumberRead/WriteGets the y.
leftnumberReadGets the left.
rightnumberReadGets the right.
topnumberReadGets the top.
bottomnumberReadGets the bottom.

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