Package: cairo

Macro cairo:with-recording-surface

Lambda List

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

Syntax

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

Arguments

surface -- a newly allocated cairo:surface-t instance
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-recording-surface macro allocates a new cairo:surface-t instance and executes the body that uses the Cairo surface. After execution of the body the allocated memory for the Cairo surface is released. This macro calls the cairo:recording-surface-create function to create the surface. If the optional x, y, width, height arguments are given a bounded recording surface is created, otherwise the recording surface is unbounded. For an unbounded recording surface the cairo:recording-surface-extents function returns a nil value.
 

See also

2025-1-29