Resource Base
Table of contents

Rect

The Rect interface extends the IntermediateResultUnit interface and represents a rectangle in a 2D space, providing a JavaScript equivalent of DSRect.

If measured in percentage, the value range for x/y/width/height is 0~100.

interface Rect {
    x: number;
    y: number;
    width: number;
    height: number;
    isMeasuredInPercentage?: boolean;
}

x

The x-coordinate of the rectangle’s top-left corner.

y

The y-coordinate of the rectangle’s top-left corner.

width

The width of the rectangle.

height

The height of the rectangle.

isMeasuredInPercentage

Optional. Indicates if the rectangle’s measurements are in percentages.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(2.2.10)
    • Version 2.x
      • Version 2.0.30
      • Version 2.0.20
      • Version 2.0.10
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support