patternCreateRasterSource

fncairo.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

userDatathe user data to be passed to all callbacks
contentcontent 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.
widthmaximum size of the sample area
heightmaximum size of the sample area

Returns

a newly created #cairo_pattern_t. Free with

[cairo.pattern.Pattern.destroy] when you are done using it.