DOMQuad
DOMQuad 是四 DOMPoints 的集合,用于定义任意四边形的角。返回 DOMQuads 允许 getBoxQuads () 即使存在任意 2D 或 3D 转换,也可以返回准确的信息。它有一个方便的边界属性返回 DOMRectReadOnly 的那些情况下,你只需要一个轴对齐的边框。
DOMQuad.DOMQuad()-
Creates a new
DOMQuadobject.
Properties
- p1,p2,p3,p4 只读
-
are
DOMPointobjects for each of theDOMQuadobject's four corners.
Methods
DOMQuad.fromRect()-
Returns a new
DOMQuadobject based on the passed set of coordinates. DOMQuad.fromQuad()-
Returns a new
DOMQuadobject based on the passed set of coordinates. DOMQuad.getBounds()-
Returns a
DOMRectobject with the coordinates and dimensions of theDOMQuadobject. DOMQuad.toJSON()-
Returns a JSON representation of the
DOMQuadobject.
Specifications
| Specification |
|---|
| Geometry Interfaces Module Level 1 # DOMQuad |
Browser compatibility
BCD tables only load in the browser