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

Dominic Lachowicz domlachowicz at gmail.com
Thu Oct 16 07:21:59 PDT 2008


Hi Chris,

On Wed, Oct 15, 2008 at 5:56 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On IRC, Behdad bemoaned the lack of support in the current API for
> cairo_pdf_surface_create(NULL, 0, 0). The use case here is querying the
> target backend for its font options and for measuring the extents of
> operations, prior to creating the real surface.

Can't one achieve Behdad's semantic using the create_for_stream()
variant with a no-op write func, without needing any changes to cairo?
Creating a valid surface for a NULL filename seems wrong to me.

Best,
Dom


More information about the cairo mailing list