Klasse PathMeasure

Alle implementierten Schnittstellen:
PointerInterface

public class PathMeasure extends Record
Performs measurements on paths 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.

https://docs.gtk.org/gsk4/struct.PathMeasure.html

  • Konstruktordetails

    • PathMeasure

      public PathMeasure(PointerContainer pointer)
    • PathMeasure

      public PathMeasure(@Nonnull Path path)
      Creates a measure object for the given @path with the
      default tolerance.
      Parameter:
      path - the path to measure
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newWithTolerancePathMeasure

      public static PathMeasure newWithTolerancePathMeasure(@Nonnull Path path, float tolerance)
      Creates a measure object for the given @path and @tolerance.
      Parameter:
      path - the path to measure
      tolerance - the tolerance for measuring operations
      Gibt zurück:
      a new `GskPathMeasure` representing @path
    • getLength

      public float getLength()
      Gets the length of the path being measured.

      The length is cached, so this function does not do any work.
      Gibt zurück:
      the length of the path measured by @self
    • getPath

      public Path getPath()
      Returns the path that the measure was created for.
      Gibt zurück:
      the path of @self
    • getPoint

      public boolean getPoint(float distance, @Nonnull PathPoint result)
      Gets the point at the given distance into the path.

      An empty path has no points, so false is returned in that case.
      Parameter:
      distance - the distance
      result - return location for the point
      Gibt zurück:
      true if @result was set
    • getTolerance

      public float getTolerance()
      Returns the tolerance that the measure was created with.
      Gibt zurück:
      the tolerance of @self
    • ref

      public PathMeasure ref()
      Increases the reference count of a `GskPathMeasure` by one.
      Gibt zurück:
      the passed in `GskPathMeasure`.
    • unref

      public void unref()
      Decreases the reference count of a `GskPathMeasure` by one.

      If the resulting reference count is zero, frees the object.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()