[cairo] API shakeup: png function names

John Ellson ellson at research.att.com
Fri Apr 1 09:01:57 PST 2005


In the absence of updated examples,  I tried to update my code based on 
the names of the functions
in cairo/cairo_png.h.

I totally misinterpred the role of this function:

cairo_surface_t *
cairo_image_surface_create_for_png (FILE *file,  int *width,  int *height);
   

Why not just call it:  cairo_surface_read_png  
so as to be clear that it is the read counterpart to the other png function?

i.e.:

cairo_status_t
cairo_surface_write_png (cairo_surface_t *surface, FILE *file);

cairo_surface_t *
cairo_surface_read_png (FILE *file, int *width, int *height);


John




More information about the cairo mailing list