Skip to main content

Rect

Electron APIs / recorder / Rect

type Rect = object;

Defines a rectangle by specifying its top-left coordinates and dimensions.

Typically used for representing positions and sizes of elements or windows.

Example

const rect: Rect = { top: 100, left: 50, width: 300, height: 200 };

Properties

PropertyTypeDescription
heightnumberThe height of the rectangle.
leftnumberThe horizontal coordinate of the left edge of the rectangle.
topnumberThe vertical coordinate of the top edge of the rectangle.
widthnumberThe width of the rectangle.