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

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 15 14:56:46 PDT 2008

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.

It must be noted that if the user passes NULL to the current create
functions, then cairo will crash (either immediately in fopen(), or
mysteriously during cairo_surface_finish()).

The actual change to support the dummy surfaces is itself fairly
trivial, but as it impacts upon API I thought I should check before
pushing to 1.8.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001--output-stream-Accept-a-NULL-filename.patch
Type: text/x-patch
Size: 0 bytes
Url : http://lists.cairographics.org/archives/cairo/attachments/20081015/6efee3b5/attachment.bin 

More information about the cairo mailing list