Package: cairo

Macro cairo:with-image-surface

Lambda List

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

Syntax

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

Arguments

surface -- a cairo:surface-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-image-surface macro allocates a new cairo:surface-t instance, initializes the Cairo surface with the format, width, and height values and executes the body that uses the Cairo surface. After execution of the body the allocated memory for the Cairo surface is released. See the documentation of the cairo:image-surface-create function for more information about the initialization of the new Cairo surface.
 

See also

2025-1-29