Path.length()

The Path.length() method returns the length of the path.

Signature

Javascript
float path.length(bool withMoves = false)

Example

Total length = 48cm Total length with moves = 80.06cm

Notes

By default, Path.length() will measure the combined length of all drawing operations in the Path, but skip over gaps in the path (caused by move operations). If you want the full length of the Path, including move operations, pass true to Path.length().