SVGGeometryElement.getPointAtLength()

SVGGeometryElement.getPointAtLength() 方法沿路径返回给定距离的点。

Note: This method was originally part of the SVGPathElement interface. SVG 2 introduced the SVGGeometryElement interface and moved the property to it.

Syntax

DOMPoint someElement.getPointAtLength(float distance);

Parameters

distance
A float referring to the distance along the path.

Return value

A DOMPoint indicating the point at a given distance along the path.

Specifications

Specification Status Comment
Scalable Vector Graphics (SVG) 2
SVGGeometryElement.getTotalLength()
Candidate Recommendation Initial definition

Browser compatibility

BCD tables only load in the browser