RasterSourceAcquireFunc

#cairo_raster_source_acquire_func_t is the type of function which is called when a pattern is being rendered from. It should create a surface that provides the pixel data for the region of interest as defined by extents, though the surface itself does not have to be limited to that area. For convenience the surface should probably be of image type, created with cairo.surface.Surface.createSimilarImage for the target (which enables the number of copies to be reduced during transfer to the device). Another option, might be to return a similar surface to the target for explicit handling by the application of a set of cached sources on the device. The region of sample data provided should be defined using cairo.surface.Surface.setDeviceOffset to specify the top-left corner of the sample data (along with width and height of the surface).

Return Value

a #cairo_surface_t