PathPoint

gsk.path_point.PathPoint 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 gsk.path_point.PathPoint, use gsk.path.Path.getClosestPoint, gsk.path.Path.getStartPoint, gsk.path.Path.getEndPoint or gsk.path_measure.PathMeasure.getPoint.

Note that gsk.path_point.PathPoint 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 gsk.path_point.PathPoint is used.

Members

Functions

compare
int compare(gsk.path_point.PathPoint point2)

Returns whether point1 is before or after point2.

copy
gsk.path_point.PathPoint copy()
equal
bool equal(gsk.path_point.PathPoint point2)

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

getCurvature
float getCurvature(gsk.path.Path path, gsk.types.PathDirection direction, graphene.point.Point center)

Calculates the curvature of the path at the point.

getDistance
float getDistance(gsk.path_measure.PathMeasure measure)

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

getPosition
void getPosition(gsk.path.Path path, graphene.point.Point position)

Gets the position of the point.

getRotation
float getRotation(gsk.path.Path path, gsk.types.PathDirection direction)

Gets the direction of the tangent at a given point.

getTangent
void getTangent(gsk.path.Path path, gsk.types.PathDirection direction, graphene.vec2.Vec2 tangent)

Gets the tangent of the path at the point.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.