Surface.writeToPngStream

cairo.types.Status writeToPngStream(cairo.types.WriteFunc writeFunc)

Writes the image surface to the write function.

Parameters

writeFunca #cairo_write_func_t

Returns

[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.