recordingSurfaceCreate

fncairo.surface.Surface recordingSurfaceCreate(cairo.types.Content content, cairo.types.Rectangle extents)

Creates a recording-surface which can be used to record all drawing operations at the highest level (that is, the level of paint, mask, stroke, fill and show_text_glyphs). The recording surface can then be "replayed" against any target surface by using it as a source to drawing operations.

The recording phase of the recording surface is careful to snapshot all necessary objects (paths, patterns, etc.), in order to achieve accurate replay.

Parameters

contentthe content of the recording surface
extentsthe extents to record in pixels, can be null to record unbounded operations.

Returns

a pointer to the newly created surface. The caller

owns the surface and should call [cairo.surface.Surface.destroy] when done with it.