Get a pointer to the data of the image surface, for direct inspection or modification.

cairo_image_surface_get_data(surface)

Arguments

surface

[cairo_surface_t *] a #cairo_image_surface_t

Value

[unsigned char *]

Details

A call to cairo_surface_flush() is required before accessing the pixel data to ensure that all pending drawing operations are finished. A call to cairo_surface_mark_dirty() is required after the data is modified.

Return value: a pointer to the image data of this surface or %NULL if surface is not an image surface, or if cairo_surface_finish() has been called.

Since: 1.2

C function prototype: unsigned char * cairo_image_surface_get_data (cairo_surface_t *surface)

See also