patternCreateRasterSource

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.

patternCreateRasterSource

Parameters

userData void*

the user data to be passed to all callbacks

content cairo.types.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 int

maximum size of the sample area

height int

maximum size of the sample area

Return Value

Type: cairo.pattern.Pattern

a newly created #cairo_pattern_t. Free with cairo.pattern.Pattern.destroy when you are done using it.