diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/domquad | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/domquad')
-rw-r--r-- | files/zh-cn/web/api/domquad/index.html | 58 |
1 files changed, 58 insertions, 0 deletions
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 +--- +<p>{{SeeCompatTable}}{{APIRef("Geometry Interfaces")}}</p> + +<p>DOMQuad 是四 DOMPoints 的集合, 用于定义任意四边形的角。返回 DOMQuads 允许 getBoxQuads () 即使存在任意2D 或3D 转换, 也可以返回准确的信息。它有一个方便的边界属性返回 DOMRectReadOnly 的那些情况下, 你只需要一个轴对齐的边框。</p> + +<dl> + <dt>{{domxref("DOMQuad.DOMQuad()")}}</dt> + <dd>Creates a new <code>DOMQuad</code> object.</dd> +</dl> + +<h2 id="Properties">Properties</h2> + +<dl> + <dt>p1,p2,p3,p4 {{readonlyinline}}</dt> + <dd>are {{domxref("DOMPoint")}} objects for each of the <code>DOMQuad</code> object's four corners.</dd> +</dl> + +<h2 id="Methods">Methods</h2> + +<dl> + <dt>{{domxref("DOMQuad.fromRect()")}}</dt> + <dd>Returns a new <code>DOMQuad</code> object based on the passed set of coordinates.</dd> + <dt>{{domxref("DOMQuad.fromQuad()")}}</dt> + <dd>Returns a new <code>DOMQuad</code> object based on the passed set of coordinates.</dd> + <dt>{{domxref("DOMQuad.getBounds()")}}</dt> + <dd>Returns a {{domxref("DOMRect")}} object with the coordinates and dimensions of the <code>DOMQuad</code> object.</dd> + <dt>{{domxref("DOMQuad.toJSON()")}}</dt> + <dd>Returns a JSON representation of the <code>DOMQuad</code> object.</dd> +</dl> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('Geometry Interfaces','#DOMQuad','DOMQuad')}}</td> + <td>{{Spec2('Geometry Interfaces')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + +<div> + + +<p>{{Compat("api.DOMQuad")}}</p> +</div> |