Package: graphene

CStruct graphene:point-t

Declaration

(cffi:defcstruct point-t
  (x :float)
  (y :float))  

Details

The graphene:point-t structure is a data structure capable of describing a point with two coordinates x and y of type float.

Access the coordinates with the graphene:point-x and graphene:point-y functions. Use the graphene:with-point and graphene:with-points macros to allocate a new graphene:point-t instance and initialize the point with values.

Examples

Allocate and initialize a point with values.
(graphene:with-point (p 1.0 1.5)
  (list (graphene:point-x p)
        (graphene:point-y p)))
=> (1.0 1.5)    
 

Slot Access Functions

See also

2024-11-9