cairo_surface_write_to_png: cairo_surface_write_to_png

Description Usage Arguments Details Value See Also

View source: R/cairo-png.R

Description

Writes the contents of surface to a new file filename as a PNG image.

Usage

1
cairo_surface_write_to_png(surface, filename)

Arguments

surface

[cairo_surface_t *] a #cairo_surface_t with pixel contents

filename

[char *] the name of a file to write to; on Windows this filename is encoded in UTF-8.

Details

Return value: %CAIRO_STATUS_SUCCESS if the PNG file was written successfully. Otherwise, %CAIRO_STATUS_NO_MEMORY if memory could not be allocated for the operation or %CAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface does not have pixel contents, or %CAIRO_STATUS_WRITE_ERROR if an I/O error occurs while attempting to write the file, or %CAIRO_STATUS_PNG_ERROR if libpng returned an error.

Since: 1.0

C function prototype: cairo_status_t cairo_surface_write_to_png (cairo_surface_t *surface, const char *filename)

Value

[int]

See Also

Other cairo-png: cairo_image_surface_create_from_png()


coolbutuseless/cairocore documentation built on Aug. 31, 2020, 12:43 a.m.