Also accepts a Rect, [x1, y1, x2, y2] or { x1, y1, x2, y2 }.
Optionalx1: number | number[] | RectLikeOptionaly1: numberOptionalx2: numberOptionaly2: numberStaticcombineSmallest rectangle that encloses all rectangles; undefined for an empty array.
Staticcontainsb lies entirely inside a.
Checks whether another rectangle lies entirely inside this one.
The other rectangle.
true when r is inside.
StaticcreateSmallest rectangle that encloses these annotations; undefined for an empty array.
Returns the annotation rectangle.
StaticcreateCreates a rectangle from a corner and a size.
Left edge.
Top edge.
Width.
Height.
A new rectangle (x, y, x + width, y + height).
Checks whether all four coordinates are exactly equal.
The other rectangle.
true when equal.
For PDF export: x1 ≤ x2 and y1 ≥ y2 (PDF y points up).
Moves the rectangle inside container (only along axes where it fits).
Returns the bottom edge (y2).
y2.
Returns the height; signed, may be negative before normalize.
y2 - y1.
Returns the left edge (x1).
x1.
Returns the right edge (x2).
x2.
Returns the top edge (y1).
y1.
Signed; may be negative before normalize.
Returns x1.
The x of the first corner.
Returns y1.
The y of the first corner.
StaticintersectsTouching edges count as intersecting.
Checks whether this rectangle intersects another; touching edges count.
The other rectangle.
true when they intersect.
Bounding rectangle of the two rectangles (y uses both rectangles' y values).
Swaps corners in place so that x1 ≤ x2 and y1 ≤ y2.
Order: bottom-left, bottom-right, top-right, top-left.
Transforms the two opposite corners and returns their bounding box.
Moves the rectangle in place.
Horizontal offset.
Vertical offset.
A rectangle given by two corners (x1, y1) and (x2, y2). In page coordinates (top-left origin, y down) x1/y1 is the top-left corner once normalized.