Package: cairo

Macro cairo:with-context

Lambda List

cairo:with-context ((context target) &body body)

Syntax

(cairo:with-context (context surface) body) => result

Arguments

context -- a newly allocated cairo:context-t instance
target -- a cairo:surface-t instance for the target surface

Details

The cairo:with-context macro allocates a new cairo:context-t instance for the given target and executes the body that uses the Cairo context. After execution of the body the allocated memory for the Cairo context is released.

This macro allocates the Cairo context with the cairo:create function and destroys it with the cairo:destroy function.
 

See also

2025-1-2