From f1efcbb10e9d5bea6df19f18e670230dc7d87f18 Mon Sep 17 00:00:00 2001 From: Yash Raj Bharti <43868318+yashrajbharti@users.noreply.github.com> Date: Sat, 16 Nov 2024 13:06:42 +0530 Subject: [PATCH] p1, p2, p3, p4 Instance Properties of DOMQuad (#36700) * add: p1, p2, p3, p4 DOMPoints defining the corners of an arbitrary quadrilateral * Removed redundant lines for p1, p2, p3, p4 and added ReadOnlyInline to each * remove: unnecessary line breaks * Apply suggestions from code review --------- Co-authored-by: Joshua Chen --- files/en-us/web/api/domquad/index.md | 10 +++++-- files/en-us/web/api/domquad/p1/index.md | 35 +++++++++++++++++++++++++ files/en-us/web/api/domquad/p2/index.md | 35 +++++++++++++++++++++++++ files/en-us/web/api/domquad/p3/index.md | 35 +++++++++++++++++++++++++ files/en-us/web/api/domquad/p4/index.md | 35 +++++++++++++++++++++++++ 5 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 files/en-us/web/api/domquad/p1/index.md create mode 100644 files/en-us/web/api/domquad/p2/index.md create mode 100644 files/en-us/web/api/domquad/p3/index.md create mode 100644 files/en-us/web/api/domquad/p4/index.md diff --git a/files/en-us/web/api/domquad/index.md b/files/en-us/web/api/domquad/index.md index 0daa33c62e3143d..ea7c75691c91ebc 100644 --- a/files/en-us/web/api/domquad/index.md +++ b/files/en-us/web/api/domquad/index.md @@ -16,8 +16,14 @@ A `DOMQuad` is a collection of four `DOMPoint`s defining the corners of an arbit ## Instance properties -- p1,p2,p3,p4 {{ReadOnlyInline}} - - : are {{domxref("DOMPoint")}} objects for each of the `DOMQuad` object's four corners. +- {{domxref("DOMQuad.p1")}} {{ReadOnlyInline}} + - : A {{domxref("DOMPoint")}} representing one corner of the `DOMQuad`. +- {{domxref("DOMQuad.p2")}} {{ReadOnlyInline}} + - : A {{domxref("DOMPoint")}} representing one corner of the `DOMQuad`. +- {{domxref("DOMQuad.p3")}} {{ReadOnlyInline}} + - : A {{domxref("DOMPoint")}} representing one corner of the `DOMQuad`. +- {{domxref("DOMQuad.p4")}} {{ReadOnlyInline}} + - : A {{domxref("DOMPoint")}} representing one corner of the `DOMQuad`. ## Instance methods diff --git a/files/en-us/web/api/domquad/p1/index.md b/files/en-us/web/api/domquad/p1/index.md new file mode 100644 index 000000000000000..ab15eb068935873 --- /dev/null +++ b/files/en-us/web/api/domquad/p1/index.md @@ -0,0 +1,35 @@ +--- +title: "DOMQuad: p1 property" +short-title: p1 +slug: Web/API/DOMQuad/p1 +page-type: web-api-instance-property +browser-compat: api.DOMQuad.p1 +--- + +{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} + +The **`DOMQuad`** interface's **`p1`** property holds the {{domxref("DOMPoint")}} object that represents one of the four corners of the `DOMQuad`. When created from {{domxref("DOMQuad.fromRect()")}}, it is the point (x, y). + +## Value + +The {{domxref("DOMPoint")}} object includes the following double-precision floating-point values: + +- {{domxref("DOMPoint.x")}}: The horizontal coordinate. +- {{domxref("DOMPoint.y")}}: The vertical coordinate. +- {{domxref("DOMPoint.z")}}: The depth coordinate. +- {{domxref("DOMPoint.w")}}: The perspective value. The default value is 1.0. + +Each of these values is **unrestricted**, meaning that it is allowed to be infinite or invalid (that is, its value may be {{jsxref("NaN")}} or {{jsxref("Infinity", "±Infinity")}}). + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- The other `DOMPoint` properties: {{domxref("DOMQuad.p2", "p2")}}, + {{domxref("DOMQuad.p3", "p3")}}, and {{domxref("DOMQuad.p4", "p4")}}. diff --git a/files/en-us/web/api/domquad/p2/index.md b/files/en-us/web/api/domquad/p2/index.md new file mode 100644 index 000000000000000..24d2087cf16d91e --- /dev/null +++ b/files/en-us/web/api/domquad/p2/index.md @@ -0,0 +1,35 @@ +--- +title: "DOMQuad: p2 property" +short-title: p2 +slug: Web/API/DOMQuad/p2 +page-type: web-api-instance-property +browser-compat: api.DOMQuad.p2 +--- + +{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} + +The **`DOMQuad`** interface's **`p2`** property holds the {{domxref("DOMPoint")}} object that represents one of the four corners of the `DOMQuad`. When created from {{domxref("DOMQuad.fromRect()")}}, it is the point (x + width, y). + +## Value + +The {{domxref("DOMPoint")}} object includes the following double-precision floating-point values: + +- {{domxref("DOMPoint.x")}}: The horizontal coordinate. +- {{domxref("DOMPoint.y")}}: The vertical coordinate. +- {{domxref("DOMPoint.z")}}: The depth coordinate. +- {{domxref("DOMPoint.w")}}: The perspective value. The default value is 1.0. + +Each of these values is **unrestricted**, meaning that it is allowed to be infinite or invalid (that is, its value may be {{jsxref("NaN")}} or {{jsxref("Infinity", "±Infinity")}}). + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- The other `DOMPoint` properties: {{domxref("DOMQuad.p1", "p1")}}, + {{domxref("DOMQuad.p3", "p3")}}, and {{domxref("DOMQuad.p4", "p4")}}. diff --git a/files/en-us/web/api/domquad/p3/index.md b/files/en-us/web/api/domquad/p3/index.md new file mode 100644 index 000000000000000..c701fe6b6aa146f --- /dev/null +++ b/files/en-us/web/api/domquad/p3/index.md @@ -0,0 +1,35 @@ +--- +title: "DOMQuad: p3 property" +short-title: p3 +slug: Web/API/DOMQuad/p3 +page-type: web-api-instance-property +browser-compat: api.DOMQuad.p3 +--- + +{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} + +The **`DOMQuad`** interface's **`p3`** property holds the {{domxref("DOMPoint")}} object that represents one of the four corners of the `DOMQuad`. When created from {{domxref("DOMQuad.fromRect()")}}, it is the point (x + width, y + height). + +## Value + +The {{domxref("DOMPoint")}} object includes the following double-precision floating-point values: + +- {{domxref("DOMPoint.x")}}: The horizontal coordinate. +- {{domxref("DOMPoint.y")}}: The vertical coordinate. +- {{domxref("DOMPoint.z")}}: The depth coordinate. +- {{domxref("DOMPoint.w")}}: The perspective value. The default value is 1.0. + +Each of these values is **unrestricted**, meaning that it is allowed to be infinite or invalid (that is, its value may be {{jsxref("NaN")}} or {{jsxref("Infinity", "±Infinity")}}). + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- The other `DOMPoint` properties: {{domxref("DOMQuad.p1", "p1")}}, + {{domxref("DOMQuad.p2", "p2")}}, and {{domxref("DOMQuad.p4", "p4")}}. diff --git a/files/en-us/web/api/domquad/p4/index.md b/files/en-us/web/api/domquad/p4/index.md new file mode 100644 index 000000000000000..f3afef7ef44ceb0 --- /dev/null +++ b/files/en-us/web/api/domquad/p4/index.md @@ -0,0 +1,35 @@ +--- +title: "DOMQuad: p4 property" +short-title: p4 +slug: Web/API/DOMQuad/p4 +page-type: web-api-instance-property +browser-compat: api.DOMQuad.p4 +--- + +{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} + +The **`DOMQuad`** interface's **`p4`** property holds the {{domxref("DOMPoint")}} object that represents one of the four corners of the `DOMQuad`. When created from {{domxref("DOMQuad.fromRect()")}}, it is the point (x, y + height). + +## Value + +The {{domxref("DOMPoint")}} object includes the following double-precision floating-point values: + +- {{domxref("DOMPoint.x")}}: The horizontal coordinate. +- {{domxref("DOMPoint.y")}}: The vertical coordinate. +- {{domxref("DOMPoint.z")}}: The depth coordinate. +- {{domxref("DOMPoint.w")}}: The perspective value. The default value is 1.0. + +Each of these values is **unrestricted**, meaning that it is allowed to be infinite or invalid (that is, its value may be {{jsxref("NaN")}} or {{jsxref("Infinity", "±Infinity")}}). + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- The other `DOMPoint` properties: {{domxref("DOMQuad.p1", "p1")}}, + {{domxref("DOMQuad.p2", "p2")}}, and {{domxref("DOMQuad.p3", "p3")}}.