diff options
Diffstat (limited to 'files/zh-cn/web/api/svggeometryelement/index.html')
-rw-r--r-- | files/zh-cn/web/api/svggeometryelement/index.html | 70 |
1 files changed, 70 insertions, 0 deletions
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> |