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

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)Calls constructor(x, y, width, height) on this Rect instance.
constructor()
contains(x: number, y: number)booleanReturns true if the point (x, y) lies within the rectangle’s bounds

See Also

 English