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.