Web SDKv1.0.0

Helpers.rectToQuad()

A Rect as a Quad, its corners named as Acrobat writes them.
static methodGeometrysince 1.0.0

Signature

rectToQuad(rect: Rect): Quad

Parameters

ParameterTypeDescription
rectRectA rectangle in page space.

Returns

Quad Its four corners as { topLeft, topRight, bottomLeft, bottomRight }.

Example

TypeScript
const [first] = match.rects;
const quad = first ? rectToQuad(first) : null;

More in Helpers