-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zh-cn]: update the translation of
DOMQuad
introduction (#24778)
- Loading branch information
1 parent
f372f5d
commit 886c51b
Showing
1 changed file
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,45 @@ | ||
--- | ||
title: DOMQuad | ||
slug: Web/API/DOMQuad | ||
l10n: | ||
sourceCommit: 525ae099185446f58b200ac59b2c423ad319a2f0 | ||
--- | ||
|
||
{{SeeCompatTable}}{{APIRef("Geometry Interfaces")}} | ||
{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} | ||
|
||
DOMQuad 是四 DOMPoints 的集合,用于定义任意四边形的角。返回 DOMQuads 允许 getBoxQuads () 即使存在任意 2D 或 3D 转换,也可以返回准确的信息。它有一个方便的边界属性返回 DOMRectReadOnly 的那些情况下,你只需要一个轴对齐的边框。 | ||
`DOMQuad` 是由四个(定义了任意四边形的角的) `DOMPoint` 组成的集合。返回 `DOMQuad` 使得 `getBoxQuads()` 在存在任意 2D 或 3D 变换时,依然能返回准确的信息。它还具有一个方便的 `bounds` 属性来返回 `DOMRectReadOnly`,适用于那些只需要轴对齐的边界矩形的情况。 | ||
|
||
- {{domxref("DOMQuad.DOMQuad()")}} | ||
- : Creates a new `DOMQuad` object. | ||
## 构造函数 | ||
|
||
## Properties | ||
- {{domxref("DOMQuad.DOMQuad", "DOMQuad()")}} | ||
- : 创建一个新的 `DOMQuad` 对象。 | ||
|
||
- p1,p2,p3,p4 {{readonlyinline}} | ||
- : are {{domxref("DOMPoint")}} objects for each of the `DOMQuad` object's four corners. | ||
## 实例属性 | ||
|
||
## Methods | ||
- {{domxref("DOMQuad.p1")}} {{ReadOnlyInline}} | ||
- : 表示 `DOMQuad` 的拐角的 {{domxref("DOMPoint")}}。 | ||
- {{domxref("DOMQuad.p2")}} {{ReadOnlyInline}} | ||
- : 表示 `DOMQuad` 的拐角的 {{domxref("DOMPoint")}}。 | ||
- {{domxref("DOMQuad.p3")}} {{ReadOnlyInline}} | ||
- : 表示 `DOMQuad` 的拐角的 {{domxref("DOMPoint")}}。 | ||
- {{domxref("DOMQuad.p4")}} {{ReadOnlyInline}} | ||
- : 表示 `DOMQuad` 的拐角的 {{domxref("DOMPoint")}}。 | ||
|
||
## 实例方法 | ||
|
||
- {{domxref("DOMQuad.fromRect()")}} | ||
- : Returns a new `DOMQuad` object based on the passed set of coordinates. | ||
- : 根据传入的坐标集返回一个新的 `DOMQuad` 对象。 | ||
- {{domxref("DOMQuad.fromQuad()")}} | ||
- : Returns a new `DOMQuad` object based on the passed set of coordinates. | ||
- : 根据提供的输入,返回一个新的 `DOMQuad` 对象或一组四边形坐标。 | ||
- {{domxref("DOMQuad.getBounds()")}} | ||
- : Returns a {{domxref("DOMRect")}} object with the coordinates and dimensions of the `DOMQuad` object. | ||
- : 返回一个包含 `DOMQuad` 对象坐标和尺寸的 {{domxref("DOMRect")}} 对象。 | ||
- {{domxref("DOMQuad.toJSON()")}} | ||
- : Returns a JSON representation of the `DOMQuad` object. | ||
- : 返回 `DOMQuad` 对象的 JSON 表示形式。 | ||
|
||
## Specifications | ||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
## 浏览器兼容性 | ||
|
||
{{Compat}} |