Package: cairo

Macro cairo:with-context-for-recording-surface

Lambda List

cairo:with-context-for-recording-surface ((context &rest args) &body body)

Syntax

(cairo:with-context-for-recording-surface (context content) body) => result
(cairo:with-context-for-recording-surface (context content x y width height) body) => result

Arguments

context -- a cairo:context-t instance to create and initialize
content -- a cairo:content-t value
x -- a number coerced to a double float for the x coordinate
y -- a number coerced to a double float for the y coordinate
width -- a number coerced to a double float for the width in pixels
height -- a number coerced to a double float for the height in pixels

Details

The cairo:with-context-for-recording-surface macro allocates a new cairo:context-t instance, initializes the Cairo context with the given values and executes the body that uses the Cairo context. After execution of the body the allocated memory for the Cairo surface is released. See the documentation of the cairo:recording-surface-create and cairo:create functions for more information about the initialization of the new Cairo context.
 

See also

2025-1-29