SVGGeometryElement: phương thức getPointAtLength()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

Phương thức SVGGeometryElement.getPointAtLength() trả về điểm tại một khoảng cách cho trước dọc theo đường dẫn.

Cú pháp

js
getPointAtLength(distance)

Tham số

distance

Một số thực tham chiếu đến khoảng cách dọc theo đường dẫn.

Giá trị trả về

Một DOMPoint chỉ điểm tại một khoảng cách cho trước dọc theo đường dẫn.

Thông số kỹ thuật

Specification
Scalable Vector Graphics (SVG) 2
# __svg__SVGGeometryElement__getPointAtLength

Tương thích trình duyệt