cairo_image_surface_create_from_png: cairo_image_surface_create_from_png

Description Usage Arguments Details Value See Also

View source: R/cairo-png.R

Description

Creates a new image surface and initializes the contents to the given PNG file.

Usage

1

Arguments

filename

[char *] name of PNG file to load. On Windows this filename is encoded in UTF-8.

Details

Return value: a new #cairo_surface_t initialized with the contents of the PNG file, or a "nil" surface if any error occurred. A nil surface can be checked for with cairo_surface_status(surface) which may return one of the following values:

%CAIRO_STATUS_NO_MEMORY %CAIRO_STATUS_FILE_NOT_FOUND %CAIRO_STATUS_READ_ERROR %CAIRO_STATUS_PNG_ERROR

Alternatively, you can allow errors to propagate through the drawing operations and check the status on the context upon completion using cairo_status().

Since: 1.0

C function prototype: cairo_surface_t * cairo_image_surface_create_from_png (const char *filename)

Value

[cairo_surface_t *]

See Also

Other cairo-png: cairo_surface_write_to_png()


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