Package: graphene
Macro graphene:with-size
Lambda Listgraphene:with-size ((var &rest args) &body body) SyntaxArgumentsDetails The graphene:with-size macro allocates a new graphene:size-t instance, initializes the graphene:size-t
instance with the given values and executes the body that uses the size.
After execution of the body the allocated memory for the size is released. When no argument is given the components of the graphene:size-t instance are initialized to zero. The initialization with two single floats uses the graphene:size-init function. The initialization from another size is done with the graphene:size-init-from-size function. NoteExamples(graphene:with-size (s) (list (graphene:size-width s) (graphene:size-height s))) => (0.0 0.0) (graphene:with-size (s 1.5 1.7) (list (graphene:size-width s) (graphene:size-height s))) => (1.5 1.7)This examples uses the graphene:with-sizes macro to initialize two graphene:size-t instances. The second instance is intialized with the values from the first instance. (graphene:with-sizes ((s1 0.3 0.5) (s2 s1)) (list (graphene:size-width s2) (graphene:size-height s2))) => (0.3 0.5) | See also |
2024-1-20