Helpers.rectFromEdges()
A
Rect from four edges, whichever way round the edges are given.static methodGeometrysince 1.0.0
Signature
rectFromEdges(edges: RectEdges): Rect
Parameters
| Parameter | Type | Description |
|---|---|---|
| edges | RectEdges | { left, bottom, right, top } — how a PDF file stores a rectangle, whichever way round the edges are given. |
Returns
Rect Its bottom-left corner and its size.
Example
TypeScript
const rect = rectFromEdges({ left: 72, bottom: 700, right: 300, top: 720 });