Table of contents

Rect

The Rect class represents a rectangle in 2D space. It contains four integer values that specify the top, left, right, and bottom edges of the rectangle.

Definition

Package: com.dynamsoft.core.basic_structures

class Rect

Attributes

Attribute Type Description
top int The top edge of the rectangle.
left int The left edge of the rectangle.
right int The right edge of the rectangle.
bottom int The bottom edge of the rectangle.
id int The ID of the rectangle.

Constructors

Constructor Description
Rect() Default constructor. Initializes a new instance of the Rect class.
Rect(int top, int left, int right, int bottom) Initializes a new instance with specified coordinates.
Rect(Rect rect) Copy constructor.

Attributes

top

The top edge of the rectangle.

public int top

left

The left edge of the rectangle.

public int left

The right edge of the rectangle.

public int right

bottom

The bottom edge of the rectangle.

public int bottom

id

The ID of the rectangle.

public int id

Constructors

Rect

Default constructor. Initializes a new instance of the Rect class.

Rect()

Rect

Initializes a new instance of the Rect class with specified coordinates.

Rect(int top, int left, int right, int bottom)

Parameters

top The top edge of the rectangle.

left The left edge of the rectangle.

right The right edge of the rectangle.

bottom The bottom edge of the rectangle.

Rect

Copy constructor. Initializes a new instance of the Rect class by copying another Rect.

Rect(Rect rect)

Parameters

rect The Rect object to copy.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: