A point with two coordinates.
function Distance
(Self : not null access Graphene_Point_T;
B : not null access Graphene_Point_T;
D_X : access Interfaces.C.C_float := null;
D_Y : access Interfaces.C.C_float := null)
return Interfaces.C.C_float
Computes the distance between A and B. Since: gtk+ 1.0
a Graphene.Point.Graphene_Point_T
distance component on the X axis
distance component on the Y axis
the distance between the two points
function Equal
(Self : not null access Graphene_Point_T;
B : not null access Graphene_Point_T) return Boolean
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. Since: gtk+ 1.0
a Graphene.Point.Graphene_Point_T
true if the points have the same coordinates
procedure Free (Self : not null access Graphene_Point_T)
Frees the resources allocated by graphene_point_alloc. Since: gtk+ 1.0
function From_Object_Free
(B : not null access Graphene_Point_T) return Graphene_Point_T
Return the underlying object and free the pointer. This is meant to be used internally by GtkAda, and should not in general be called by user code.
function Get_Type return Glib.GType
type Graphene_Point_Array is array (Natural range <>) of Graphene_Point_T;
type Graphene_Point_T is record
X : Interfaces.C.C_float;
Y : Interfaces.C.C_float;
end record;
A point with two coordinates.
function Init
(Self : not null access Graphene_Point_T;
X : Interfaces.C.C_float;
Y : Interfaces.C.C_float) return access Graphene_Point_T
Initializes P to the given X and Y coordinates. It's safe to call this function multiple times. Since: gtk+ 1.0
the X coordinate
the Y coordinate
the initialized point
function Init_From_Point
(Self : not null access Graphene_Point_T;
Src : not null access Graphene_Point_T)
return access Graphene_Point_T
Initializes P with the same coordinates of Src. Since: gtk+ 1.0
the Graphene.Point.Graphene_Point_T to use
the initialized point
function Init_From_Vec2
(Self : not null access Graphene_Point_T;
Src : not null access Graphene.Vec2.Graphene_Vec2_T)
return access Graphene_Point_T
Initializes P with the coordinates inside the given Graphene.Vec2.Graphene_Vec2_T. Since: gtk+ 1.4
a Graphene.Vec2.Graphene_Vec2_T
the initialized point
procedure Interpolate
(Self : not null access Graphene_Point_T;
B : not null access Graphene_Point_T;
Factor : Gdouble;
Res : not null access Graphene_Point_T)
Linearly interpolates the coordinates of A and B using the given Factor. Since: gtk+ 1.0
a Graphene.Point.Graphene_Point_T
the linear interpolation factor
return location for the interpolated point
function Near
(Self : not null access Graphene_Point_T;
B : not null access Graphene_Point_T;
Epsilon : Interfaces.C.C_float) return Boolean
Checks whether the two points A and B are within the threshold of Epsilon. Since: gtk+ 1.0
a Graphene.Point.Graphene_Point_T
threshold between the two points
true if the distance is within Epsilon
procedure To_Vec2
(Self : not null access Graphene_Point_T;
V : not null access Graphene.Vec2.Graphene_Vec2_T)
Stores the coordinates of the given Graphene.Point.Graphene_Point_T into a Graphene.Vec2.Graphene_Vec2_T. Since: gtk+ 1.4
return location for the vertex
function Zero return access constant Graphene_Point_T
Returns a point fixed at (0, 0). Since: gtk+ 1.0
a fixed point