DOMQuad
js.html.DOMQuad (extern class)
A DOMQuad
is a collection of four DOMPoint
s defining the corners of an arbitrary quadrilateral. Returning DOMQuad
s 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.
Documentation DOMQuad by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
Instance Members
p1: DOMPoint
are DOMPoint
objects for each of the DOMQuad
object's four corners.
p2: DOMPoint
p3: DOMPoint
p4: DOMPoint
bounds: DOMRectReadOnly
getBounds(): DOMRectReadOnly
Returns a DOMRect
object with the coordinates and dimensions of the DOMQuad
object.
Returns |
---|
DOMRectReadOnly |
toJSON(): DOMQuadJSON
Returns a JSON representation of the DOMQuad
object.
Returns |
---|
DOMQuadJSON |
new(rect: DOMRectReadOnly): Void
Name | Type |
---|---|
rect |
DOMRectReadOnly |