Resource Base
Table of contents


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;


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


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


The width of the rectangle.


The height of the rectangle.


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.30)
    • Version 2.x
      • Version 2.2.10
      • 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