Returns an image surface that is the most efficient mechanism for modifying the backing store of the target surface. The region retrieved may be limited to the extents or NULL for the whole surface Note, the use of the original surface as a target or source whilst it is mapped is undefined. The result of mapping the surface multiple times is undefined. Calling Surface.destroy or Surface.finish on the resulting image surface results in undefined behavior. Since 1.12

class Surface


extents cairo_rectangle_int_t

limit the extraction to an rectangular region

Return Value

Type: Surface

a pointer to the newly allocated image surface. The caller must use Surface.unmapImage to destroy this image surface. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if other is already in an error state or any other error occurs.