PathPoint

class PathPoint(pointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

GskPathPoint is an opaque type representing a point on a path.

It can be queried for properties of the path at that point, such as its tangent or its curvature.

To obtain a GskPathPoint, use method@Gsk.Path.get_closest_point, method@Gsk.Path.get_start_point, method@Gsk.Path.get_end_point or method@Gsk.PathMeasure.get_point.

Note that GskPathPoint structs are meant to be stack-allocated, and don't hold a reference to the path object they are obtained from. It is the callers responsibility to keep a reference to the path as long as the GskPathPoint is used.

Skipped during bindings generation

  • field padding: Array parameter of type gpointer is not supported

  • field alignment: Graphene.Vec4

Since

4.14

Constructors

Link copied to clipboard
constructor()

Allocate a new PathPoint.

constructor(scope: <Error class: unknown class>)

Allocate a new PathPoint using the provided AutofreeScope.

constructor(contour: <Error class: unknown class>, idx: <Error class: unknown class>, t: <Error class: unknown class>)

Allocate a new PathPoint.

constructor(contour: <Error class: unknown class>, idx: <Error class: unknown class>, t: <Error class: unknown class>, scope: <Error class: unknown class>)

Allocate a new PathPoint using the provided AutofreeScope.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var contour: <Error class: unknown class>
Link copied to clipboard
val gskPathPointPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
var idx: <Error class: unknown class>
Link copied to clipboard
var t: <Error class: unknown class>

Functions

Link copied to clipboard
fun compare(point2: PathPoint): <Error class: unknown class>

Returns whether @point1 is before or after @point2.

Link copied to clipboard

Copies a path point.

Link copied to clipboard
fun equal(point2: PathPoint): Boolean

Returns whether the two path points refer to the same location on all paths.

Link copied to clipboard
fun free()

Frees a path point copied by method@Gsk.PathPoint.copy.

Link copied to clipboard
fun getCurvature(path: Path, direction: PathDirection, center: <Error class: unknown class>?): <Error class: unknown class>

Calculates the curvature of the path at the point.

Link copied to clipboard
fun getDistance(measure: PathMeasure): <Error class: unknown class>

Returns the distance from the beginning of the path to @point.

Link copied to clipboard
fun getPosition(path: Path, position: <Error class: unknown class>)

Gets the position of the point.

Link copied to clipboard
fun getRotation(path: Path, direction: PathDirection): <Error class: unknown class>

Gets the direction of the tangent at a given point.

Link copied to clipboard
fun getTangent(path: Path, direction: PathDirection, tangent: <Error class: unknown class>)

Gets the tangent of the path at the point.

Link copied to clipboard
open override fun toString(): String