[cairo] [API] Accept NULL for cairo_(pdf|ps|svg)_surface_create

Chris Wilson chris at chris-wilson.co.uk
Thu Oct 16 07:29:47 PDT 2008


On Thu, 2008-10-16 at 11:14 -0300, Ian Britten wrote:
> For example, I *think* Cairo would let me do something like:
> - Generate a physically huge vector drawing (ie: PDF)
> - Make a temporary offscreen image at a practical size
> - Walk over my huge surface and copy each 'tile' from the PDF surface
>    to my temporary image (Thereby rasterizing that piece of the PDF)
> - Save each tile to an individual raster file.
> 
> Basically, I'm thinking an approach like this would let me generate
> a large, high-resolution drawing as a series of smaller images,
> without running out of memory, and without re-rendering my data over
> and over for each tile.

Whilst you could use a dummy PDF (with a large size, as the current
proposed change would allow), all you really want is the meta-surface.
It just so happens that prior to cairo_surface_finish() the PDF is
stored as and can be used as a meta-surface source. In short this would
do what you want, but it would be better to actually export the
meta-surface.
-- 
Chris



More information about the cairo mailing list