PathMeasure#
Added in version 4.14.
- class PathMeasure(**kwargs)#
GskPathMeasure is an object that allows measurements
on GskPaths such as determining the length of the path.
Many measuring operations require sampling the path length
at intermediate points. Therefore, a GskPathMeasure has
a tolerance that determines what precision is required
for such approximations.
A GskPathMeasure struct is a reference counted struct
and should be treated as opaque.
Constructors#
- class PathMeasure
- classmethod new(path: Path) PathMeasure#
Creates a measure object for the given
pathwith the default tolerance.Added in version 4.14.
- Parameters:
path – the path to measure
- classmethod new_with_tolerance(path: Path, tolerance: float) PathMeasure#
Creates a measure object for the given
pathandtolerance.Added in version 4.14.
- Parameters:
path – the path to measure
tolerance – the tolerance for measuring operations
Methods#
- class PathMeasure
- get_length() float#
Gets the length of the path being measured.
The length is cached, so this function does not do any work.
Added in version 4.14.