Package: cairo

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

Lambda List

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

Syntax

(cairo:with-context-for-image-surface (context format width height) body) => result

Arguments

context -- a cairo:context-t instance to create and initialize
format -- a cairo:format-t value for the format of pixels in the surface to create
width -- an integer for the width of the surface, in pixels
height -- an integer for the height of the surface, in pixels

Details

The cairo:with-context-for-image-surface macro allocates a new cairo:context-t instance for an image surface, initializes the Cairo context with the format, width, and height 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:image-surface-create and cairo:create functions for more information about the initialization of the new Cairo context.
 

See also

2025-1-29