Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. DOMQuad

DOMQuad

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨January 2020⁩.

Note: This feature is available inWeb Workers.

ADOMQuad is a collection of fourDOMPoints defining the corners of an arbitrary quadrilateral. ReturningDOMQuads letsgetBoxQuads() return accurate information even when arbitrary 2D or 3D transforms are present. It has a handybounds attribute returning aDOMRectReadOnly for those cases where you just want an axis-aligned bounding rectangle.

Constructor

DOMQuad()

Creates a newDOMQuad object.

Instance properties

DOMQuad.p1Read only

ADOMPoint representing one corner of theDOMQuad.

DOMQuad.p2Read only

ADOMPoint representing one corner of theDOMQuad.

DOMQuad.p3Read only

ADOMPoint representing one corner of theDOMQuad.

DOMQuad.p4Read only

ADOMPoint representing one corner of theDOMQuad.

Instance methods

DOMQuad.getBounds()

Returns aDOMRect object with the coordinates and dimensions of theDOMQuad object.

DOMQuad.toJSON()

Returns a JSON representation of theDOMQuad object.

Static methods

DOMQuad.fromQuad()

Returns a newDOMQuad object based on the provided set of coordinates in the shape of anotherDOMQuad object.

DOMQuad.fromRect()

Returns a newDOMQuad object based on the provided set of coordinates in the shape of aDOMRect object.

Specifications

Specification
Geometry Interfaces Module Level 1
# DOMQuad

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp