Resource Base
Table of contents
Notice: This documentation is archived. For the latest product features and documentation, please visit Dynamsoft Capture Vision Documentation.

Rect

The Rect interface 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.

Is this page helpful?

YesYes NoNo

In this article:

Version 2.2.10

    • version 2.2.10
    • Version 2.x
      • Version 2.2.10
      • Version 2.0.30
      • Version 2.0.20
      • Version 2.0.10
    Change +