Package: cairo

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

Lambda List

cairo:with-context-for-pdf-surface ((context path width height) &body body)

Syntax

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

Arguments

context -- a cairo:context-t instance to create and initialize
path -- a path or namestring with a filename for the PDF output, nil may be used to specify no output, this will generate a PDF surface that may be queried and used as a source, without generating a temporary file
width -- a number coerced to a double float for the width of the surface, in points (1 point == 1/72 inch)
height -- a number coerced to a double float for the height of the surface, in points (1 point == 1/72 inch)

Details

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

See also

2025-1-13