The pathLength
attribute lets authors specify a total length for the path, in user units. This value is then used to calibrate the browser's distance calculations with those of the author, by scaling all distance computations using the ratio pathLength
/ (computed value of path length).
This can affect the actual rendered lengths of paths; including text paths, animation paths, and various stroke operations. Basically, all computations that require the length of the path. stroke-dasharray
, for example, will assume the start of the path being 0 and the end point the value defined in the pathLength
attribute.
You can use this attribute with the following SVG elements: