:right-sidebar: True PathMeasure =================================================================== .. currentmodule:: gi.repository.Gsk .. versionadded:: 4.14 .. class:: PathMeasure(**kwargs) :no-contents-entry: :Constructors: :: new(path:Gsk.Path) -> Gsk.PathMeasure new_with_tolerance(path:Gsk.Path, tolerance:float) -> Gsk.PathMeasure Constructors ------------ .. rst-class:: interim-class .. class:: PathMeasure :no-index: .. classmethod:: new(path: ~gi.repository.Gsk.Path) -> ~gi.repository.Gsk.PathMeasure Creates a measure object for the given ``path`` with the default tolerance. .. versionadded:: 4.14 :param path: the path to measure .. classmethod:: new_with_tolerance(path: ~gi.repository.Gsk.Path, tolerance: float) -> ~gi.repository.Gsk.PathMeasure Creates a measure object for the given ``path`` and ``tolerance``. .. versionadded:: 4.14 :param path: the path to measure :param tolerance: the tolerance for measuring operations Methods ------- .. rst-class:: interim-class .. class:: PathMeasure :no-index: .. method:: get_length() -> float Gets the length of the path being measured. The length is cached, so this function does not do any work. .. versionadded:: 4.14 .. method:: get_path() -> ~gi.repository.Gsk.Path Returns the path that the measure was created for. .. versionadded:: 4.14 .. method:: get_point(distance: float) -> tuple[bool, ~gi.repository.Gsk.PathPoint] Sets ``result`` to the point at the given distance into the path. An empty path has no points, so ``FALSE`` is returned in that case. .. versionadded:: 4.14 :param distance: the distance .. method:: get_tolerance() -> float Returns the tolerance that the measure was created with. .. versionadded:: 4.14