Module Cairo.Recording

module Recording: sig .. end
The recording surface is a surface that records all drawing operations at the highest level of the surface backend interface. The surface can then be "replayed" against any target surface by using it as a source surface.

A recording surface is logically unbounded, i.e. it has no implicit constraint on the size of the drawing surface.


val create : ?extents:Cairo.rectangle -> Cairo.content -> Cairo.Surface.t
Creates a recording surface with the specified content. It can record all drawing operations at the highest level (that is, the level of Cairo.paint, Cairo.mask, Cairo.stroke, Cairo.fill and Cairo.Glyph.show_text). The surface is unbounded (no constraints on the size of the drawing surface) unless the extents argument is provided. Copying to another surface (see Cairo.set_source_surface) will be more efficient (and sometime required) if the extents are specified when the recording surface is created.
val ink_extents : Cairo.Surface.t -> Cairo.rectangle
Measures the extents of the operations stored within the recording surface. This is useful to compute the required size of another drawing surface into which to replay the full sequence of drawing operations.