Package: cairo

Function cairo:ps-surface-create

Lambda List

cairo:ps-surface-create (path width height)

Arguments

path -- a path or namestring for a filename for the PS output, nil may be used to specify no output, this will generate a PS 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)

Return Value

The newly created PostScript cairo:surface-t instance.

Details

Creates a PostScript surface of the specified size in points to be written to path. The caller owns the surface and should call the cairo:surface-destroy function when done with it.

This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use the cairo:surface-status function to check for this.

Note that the size of individual pages of the PostScript output can vary. See the cairo:ps-surface-set-size function.
 

See also

2025-1-29