[cairo.pattern.Pattern.destroy] when you are done using it.
patternCreateRasterSource
fn
cairo.pattern.Pattern patternCreateRasterSource(void * userData, cairo.types.Content content, int width, int height)Creates a new user pattern for providing pixel data.
Use the setter functions to associate callbacks with the returned pattern. The only mandatory callback is acquire.
Parameters
userData | the user data to be passed to all callbacks |
content | content type for the pixel data that will be returned. Knowing the content type ahead of time is used for analysing the operation and picking the appropriate rendering path. |
width | maximum size of the sample area |
height | maximum size of the sample area |
Returns
a newly created #cairo_pattern_t. Free with