aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/svggeometryelement
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/svggeometryelement
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/svggeometryelement')
-rw-r--r--files/zh-cn/web/api/svggeometryelement/getpointatlength/index.html58
-rw-r--r--files/zh-cn/web/api/svggeometryelement/index.html70
2 files changed, 128 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/svggeometryelement/getpointatlength/index.html b/files/zh-cn/web/api/svggeometryelement/getpointatlength/index.html
new file mode 100644
index 0000000000..fdfe7c1d5d
--- /dev/null
+++ b/files/zh-cn/web/api/svggeometryelement/getpointatlength/index.html
@@ -0,0 +1,58 @@
+---
+title: SVGGeometryElement.getPointAtLength()
+slug: Web/API/SVGGeometryElement/getPointAtLength
+tags:
+ - SVG
+ - getPointAtLength
+translation_of: Web/API/SVGGeometryElement/getPointAtLength
+---
+<div>{{APIRef("SVG")}}</div>
+
+<p><code><strong>SVGGeometryElement.getPointAtLength()</strong></code> 方法沿路径返回给定距离的点。</p>
+
+<div class="note">
+<p><strong>Note:</strong> This method was originally part of the {{domxref("SVGPathElement")}} interface. SVG 2 introduced the {{domxref("SVGGeometryElement")}} interface and moved the property to it.</p>
+</div>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">DOMPoint <var>someElement</var>.getPointAtLength(float <var>distance</var>);
+</pre>
+
+<h3 id="Parameters">Parameters</h3>
+
+<dl>
+ <dt>distance</dt>
+ <dd>A float referring to the distance along the path.</dd>
+</dl>
+
+<h3 id="Return_value">Return value</h3>
+
+<p>A {{domxref("DOMPoint")}} indicating the point at a given distance along the path.</p>
+
+<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("SVG2", "types.html#__svg__SVGGeometryElement__getPointAtLength", "SVGGeometryElement.getTotalLength()")}}</td>
+ <td>{{Spec2("SVG2")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.SVGGeometryElement.getPointAtLength")}}</p>
+
+<div id="gtx-trans" style="position: absolute; left: 387px; top: 93px;">
+<div class="gtx-trans-icon"></div>
+</div>
diff --git a/files/zh-cn/web/api/svggeometryelement/index.html b/files/zh-cn/web/api/svggeometryelement/index.html
new file mode 100644
index 0000000000..9d9ca5ace1
--- /dev/null
+++ b/files/zh-cn/web/api/svggeometryelement/index.html
@@ -0,0 +1,70 @@
+---
+title: SVGGeometryElement
+slug: Web/API/SVGGeometryElement
+tags:
+ - API
+ - DOM
+ - NeedsExample
+ - NeedsTranslation
+ - Reference
+ - SVG
+ - SVG DOM
+ - TopicStub
+translation_of: Web/API/SVGGeometryElement
+---
+<div>{{APIRef("SVG")}}</div>
+
+<p>The <code>SVGGeometryElement</code> interface represents SVG elements whose rendering is defined by geometry with an equivalent path, and which can be filled and stroked. This includes paths and the basic shapes.</p>
+
+<p>{{InheritanceDiagram(600, 140)}}</p>
+
+<div class="note">
+<p><strong>Note:</strong> The <code>pathLength</code> property and the <code>getTotalLength()</code> and <code>getPointAtLength()</code> methods were originally part of the {{domxref("SVGPathElement")}} interface. In SVG 2 they were moved to this interface.</p>
+</div>
+
+<h2 id="Properties">Properties</h2>
+
+<p><em>This interface also inherits properties from its parent, {{domxref("SVGGraphicsElement")}}.</em></p>
+
+<dl>
+ <dt>{{domxref("SVGGeometryElement.pathLength")}} {{readOnlyInline}}</dt>
+ <dd>This property reflects the {{SVGAttr("pathLength")}} attribute.</dd>
+</dl>
+
+<h2 id="Methods">Methods</h2>
+
+<p><em>This interface also inherits methods from its parent, {{domxref("SVGGraphicsElement")}}.</em></p>
+
+<dl>
+ <dt>{{domxref("SVGGeometryElement.isPointInFill()")}}</dt>
+ <dd>Determines whether a given point is within the fill shape of an element. Normal hit testing rules apply; the value of the {{cssxref("pointer-events")}} property on the element determines whether a point is considered to be within the fill.</dd>
+ <dt>{{domxref("SVGGeometryElement.isPointInStroke()")}}</dt>
+ <dd>Determines whether a given point is within the stroke shape of an element. Normal hit testing rules apply; the value of the {{cssxref("pointer-events")}} property on the element determines whether a point is considered to be within the stroke.</dd>
+ <dt>{{domxref("SVGGeometryElement.getTotalLength()")}}</dt>
+ <dd>Returns the user agent's computed value for the total length of the path in user units.</dd>
+ <dt>{{domxref("SVGGeometryElement.getPointAtLength()")}}</dt>
+ <dd>Returns the point at a given distance along the path.</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("SVG2", "types.html#InterfaceSVGGeometryElement", "SVGGeometryElement")}}</td>
+ <td>{{Spec2("SVG2")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.SVGGeometryElement")}}</p>