Basics
Guides
API Reference
Basics
Guides
API Reference
[28:7] extends: object
A point with two coordinates.
GraphenePoint (Handle = null)
Allocates a new #graphene_point_t structure. The coordinates of the returned point are (0, 0). It's possible to chain this function with graphene_point_init() or graphene_point_init_from_point(), e.g.: |[ graphene_point_t * point_new (float x, float y) { return graphene_point_init (graphene_point_alloc (), x, y); } graphene_point_t * point_copy (const graphene_point_t *p) { return graphene_point_init_from_point (graphene_point_alloc (), p); } ]|
Handle is an optional native handle or wrapper whose handle to adopt; when the native constructor is called.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.distance (object b)
Computes the distance between @a and @b.
b is a #graphene_point_t.d_x is distance component on the X axis.d_y is distance component on the Y axis.the distance between the two points.distance_squared (object b)
Computes the squared distance between @a and @b.
b is a #graphene_point_t.the distance between the two points, squared.equal (object b)
Checks if the two points @a and @b point to the same coordinates. This function accounts for floating point fluctuations; if you want to control the fuzziness of the match, you can use graphene_point_near() instead.
b is a #graphene_point_t.true if the points have the same coordinates.free ()
Frees the resources allocated by graphene_point_alloc().
None.init (double x, double y)
Initializes @p to the given @x and @y coordinates. It's safe to call this function multiple times.
x is the X coordinate.y is the Y coordinate.the initialized point.init_from_point (object src)
Initializes @p with the same coordinates of @src.
src is the #graphene_point_t to use.the initialized point.init_from_vec2 (object src)
Initializes @p with the coordinates inside the given #graphene_vec2_t.
src is a #graphene_vec2_t.the initialized point.interpolate (object b, double factor)
Linearly interpolates the coordinates of @a and @b using the given
b is a #graphene_point_t.factor is the linear interpolation factor.res is return location for the interpolated point.None.near (object b, double epsilon)
Checks whether the two points @a and @b are within the threshold of
b is a #graphene_point_t.epsilon is threshold between the two points.true if the distance is within @epsilon.to_vec2 ()
Stores the coordinates of the given #graphene_point_t into a #graphene_vec2_t.
v is return location for the vertex.None.[12:14] static extends: object
Generated struct layout helper for GIR record Point.
layout ()
Returns the Panama struct layout for
Point.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.