Package: cairo

Macro cairo:with-pdf-surface

Lambda List

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

Syntax

(cairo:with-pdf-surface (surface path width height) body) => result

Arguments

surface -- a PDF cairo:surface-t instance
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-pdf-surface macro allocates a new PDF cairo:surface-t instance for the given path, width, and height values and executes the body that uses the PDF surface. After execution of the body the allocated memory for the PDF surface is released.
 

See also

2025-1-13