From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/domquad/index.html | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 files/zh-cn/web/api/domquad/index.html (limited to 'files/zh-cn/web/api/domquad') diff --git a/files/zh-cn/web/api/domquad/index.html b/files/zh-cn/web/api/domquad/index.html new file mode 100644 index 0000000000..2cc6117bcd --- /dev/null +++ b/files/zh-cn/web/api/domquad/index.html @@ -0,0 +1,58 @@ +--- +title: DOMQuad +slug: Web/API/DOMQuad +translation_of: Web/API/DOMQuad +--- +

{{SeeCompatTable}}{{APIRef("Geometry Interfaces")}}

+ +

DOMQuad 是四 DOMPoints 的集合, 用于定义任意四边形的角。返回 DOMQuads 允许 getBoxQuads () 即使存在任意2D 或3D 转换, 也可以返回准确的信息。它有一个方便的边界属性返回 DOMRectReadOnly 的那些情况下, 你只需要一个轴对齐的边框。

+ +
+
{{domxref("DOMQuad.DOMQuad()")}}
+
Creates a new DOMQuad object.
+
+ +

Properties

+ +
+
p1,p2,p3,p4 {{readonlyinline}}
+
are {{domxref("DOMPoint")}} objects for each of the DOMQuad object's four corners.
+
+ +

Methods

+ +
+
{{domxref("DOMQuad.fromRect()")}}
+
Returns a new DOMQuad object based on the passed set of coordinates.
+
{{domxref("DOMQuad.fromQuad()")}}
+
Returns a new DOMQuad object based on the passed set of coordinates.
+
{{domxref("DOMQuad.getBounds()")}}
+
Returns a {{domxref("DOMRect")}} object with the coordinates and dimensions of the DOMQuad object.
+
{{domxref("DOMQuad.toJSON()")}}
+
Returns a JSON representation of the DOMQuad object.
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geometry Interfaces','#DOMQuad','DOMQuad')}}{{Spec2('Geometry Interfaces')}}Initial definition.
+ +

Browser compatibility

+ +
+ + +

{{Compat("api.DOMQuad")}}

+
-- cgit v1.2.3-54-g00ecf