create#
Creates a surface that records the drawing operations performed on it instead of rendering them, so they can be replayed later onto any other surface at any resolution.
my $rec = Cairo::RecordingSurface->create(‘color-alpha’, { x => 0, y => 0, width => 100, height => 100 }); my $unbounded = Cairo::RecordingSurface->create(‘color-alpha’);
$content is 'color', 'alpha' or 'color-alpha'. The second argument bounds the recording: a plain hash reference with the keys x, y, width and height, or undef/omitted for an unbounded surface that accepts drawing anywhere. Replay a recording by using it as a source, for instance through $cr->set_source_surface. Wraps cairo_recording_surface_create.