Package: graphene

Macro graphene:with-quad

Lambda List

graphene:with-quad ((var &rest args) &body body)

Syntax

(graphene:with-quad (q) body) => result
(graphene:with-quad (q r) body) => result
(graphene:with-quad (q p0 p1 p2 p3) body) => result

Arguments

q -- a graphene:quad-t instance to create and initialize
r -- a graphene:rect-t instance
p0 -- a graphene:point-t instance with the first point
p1 -- a graphene:point-t instance with the second point
p2 -- a graphene:point-t instance with the third point
p3 -- a graphene:point-t instance with the fourth point

Details

The graphene:with-quad macro allocates a new graphene:quad-t instance, initializes the quadrilateral with the given values and executes the body that uses the quadrilateral. After execution of the body the allocated memory for the quadrilateral is released.

When no argument is given the components of the quadrilateral are initialized to zeros. The initialization with four points uses the graphene:quad-init function. The initialization from a rectangle is done with the graphene:quad-init-from-rect function.

Note

The memory is allocated with the graphene:quad-alloc function and released with the graphene:quad-free function.
 

See also

2024-1-20