Note: This feature is available in Web Workers.
A DOMQuad is a collection of four DOMPoints defining the corners of an arbitrary quadrilateral. Returning DOMQuads lets getBoxQuads() return accurate information even when arbitrary 2D or 3D transforms are present. It has a handy bounds attribute returning a DOMRectReadOnly for those cases where you just want an axis-aligned bounding rectangle.
DOMQuad()Creates a new DOMQuad object.
DOMQuad.p1 Read onlyA DOMPoint representing one corner of the DOMQuad.
DOMQuad.p2 Read onlyA DOMPoint representing one corner of the DOMQuad.
DOMQuad.p3 Read onlyA DOMPoint representing one corner of the DOMQuad.
DOMQuad.p4 Read onlyA DOMPoint representing one corner of the DOMQuad.
DOMQuad.getBounds()Returns a DOMRect object with the coordinates and dimensions of the DOMQuad object.
DOMQuad.toJSON()Returns a JSON representation of the DOMQuad object.
DOMQuad.fromQuad()Returns a new DOMQuad object based on the provided set of coordinates in the shape of another DOMQuad object.
DOMQuad.fromRect()Returns a new DOMQuad object based on the provided set of coordinates in the shape of a DOMRect object.