Surface.writeToPngStream

Writes the image surface to the write function.

class Surface
writeToPngStream

Parameters

writeFunc cairo.types.WriteFunc

a #cairo_write_func_t

Return Value

Type: cairo.types.Status

cairo.types.Status.Success if the PNG file was written successfully. Otherwise, cairo.types.Status.NoMemory is returned if memory could not be allocated for the operation, cairo.types.Status.SurfaceTypeMismatch if the surface does not have pixel contents, or cairo.types.Status.PngError if libpng returned an error.