# Helpers.quadToRect()

```ts
quadToRect(quad: Quad): Rect
```

A `Quad`'s bounds, as a `Rect`.

- Kind: static method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `quad` | `Quad` | `{ topLeft, topRight, bottomLeft, bottomRight }` — one line a text mark covers. |

Returns `Rect`: The bounds of the quad.

```ts
const [first] = highlight.quads ?? [];
const firstLine = first ? quadToRect(first) : null;
```

Part of [Helpers](https://kernstra.com/docs/web-sdk/api/helpers) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/helpers/quadtorect
