Package: cairo

Function cairo-surface-finish

Lambda List

cairo-surface-finish (surface)

Arguments

surface -- a cairo-surface-t instance

Details

This function finishes the surface and drops all references to external resources. For example, for the Xlib backend it means that Cairo will no longer access the drawable, which can be freed. After calling the function cairo-surface-finish the only valid operations on a surface are getting and setting user, referencing and destroying, and flushing and finishing it. Further drawing to the surface will not affect the surface but will instead trigger a :surface-finished error.

When the last call to the function cairo-surface-destroy decreases the reference count to zero, Cairo will call the function cairo-surface-finish if it has not been called already, before freeing the resources associated with the surface.
 

See also

2020-12-21