# Rect

The `Rect` interface represents a rectangle in a 2D space, providing a JavaScript equivalent of [DSRect](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/core/basic-structures/ds-rect.md).

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

```typescript
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.
