Sets our main struct and passes it to the parent class
Creates a new user pattern for providing pixel data.
Queries the current acquire and release callbacks. Since 1.12
Queries the current user data. Since 1.12
Queries the current copy callback. Since 1.12
Queries the current finish callback. Since 1.12
Get the main Gtk struct
Queries the current snapshot callback. Since 1.12
the main Gtk struct as a void*
Specifies the callbacks used to generate the image surface for a rendering operation (acquire) and the function used to cleanup that surface afterwards. The acquire callback should create a surface (preferably an image surface created to match the target using Surface.createSimilarImage) that defines at least the region of interest specified by extents. The surface is allowed to be the entire sample area, but if it does contain a subsection of the sample area, the surface extents should be provided by setting the device offset (along with its width and height) using Surface.setDeviceOffset. Since 1.12
Updates the user data that is provided to all callbacks. Since 1.12
Updates the copy callback which is used whenever a temporary copy of the pattern is taken. Since 1.12
Updates the finish callback which is used whenever a pattern (or a copy thereof) will no longer be used. Since 1.12
Sets the callback that will be used whenever a snapshot is taken of the pattern, that is whenever the current contents of the pattern should be preserved for later use. This is typically invoked whilst printing. Since 1.12
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Adds an opaque color stop to a gradient pattern. The offset specifies the location along the gradient's control vector. For example, a linear gradient's control vector is from (x0,y0) to (x1,y1) while a radial gradient's control vector is from any point on the start circle to the corresponding point on the end circle. The color is specified in the same way as in cairo_set_source_rgb(). If two (or more) stops are specified with identical offset values, they will be sorted according to the order in which the stops are added, (stops added earlier will compare less than stops added later). This can be useful for reliably making sharp color transitions instead of the typical blend. Note: If the pattern is not a gradient pattern, (eg. a linear or radial pattern), then the pattern will be put into an error status with a status of CAIRO_STATUS_PATTERN_TYPE_MISMATCH. Since 1.0
Adds a translucent color stop to a gradient pattern. The offset specifies the location along the gradient's control vector. For example, a linear gradient's control vector is from (x0,y0) to (x1,y1) while a radial gradient's control vector is from any point on the start circle to the corresponding point on the end circle. The color is specified in the same way as in cairo_set_source_rgba(). If two (or more) stops are specified with identical offset values, they will be sorted according to the order in which the stops are added, (stops added earlier will compare less than stops added later). This can be useful for reliably making sharp color transitions instead of the typical blend. Note: If the pattern is not a gradient pattern, (eg. a linear or radial pattern), then the pattern will be put into an error status with a status of CAIRO_STATUS_PATTERN_TYPE_MISMATCH. Since 1.0
Gets the number of color stops specified in the given gradient pattern. Since 1.4
Gets the color and offset information at the given index for a gradient pattern. Values of index are 0 to 1 less than the number returned by Pattern.getColorStopCount. Since 1.4
Creates a new cairo_pattern_t corresponding to an opaque color. The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped. Since 1.0
Creates a new cairo_pattern_t corresponding to a translucent color. The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped. Since 1.0
Gets the solid color for a solid color pattern. Since 1.4
Create a new cairo_pattern_t for the given surface. Since 1.0
Gets the surface of a surface pattern. The reference returned in surface is owned by the pattern; the caller should call Surface.reference if the surface is to be retained. Since 1.4
Create a new linear gradient cairo_pattern_t along the line defined by (x0, y0) and (x1, y1). Before using the gradient pattern, a number of color stops should be defined using Pattern.addColorStopRgb or Pattern.addColorStopRgba. Note: The coordinates here are in pattern space. For a new pattern, pattern space is identical to user space, but the relationship between the spaces can be changed with Pattern.setMatrix. Since 1.0
Gets the gradient endpoints for a linear gradient. Since 1.4
Creates a new radial gradient cairo_pattern_t between the two circles defined by (cx0, cy0, radius0) and (cx1, cy1, radius1). Before using the gradient pattern, a number of color stops should be defined using Pattern.addColorStopRgb or Pattern.addColorStopRgba. Note: The coordinates here are in pattern space. For a new pattern, pattern space is identical to user space, but the relationship between the spaces can be changed with Pattern.setMatrix. Since 1.0
Gets the gradient endpoint circles for a radial gradient, each specified as a center coordinate and a radius. Since 1.4
Increases the reference count on pattern by one. This prevents pattern from being destroyed until a matching call to Pattern.destroy is made. The number of references to a cairo_pattern_t can be get using Pattern.getReferenceCount. Since 1.0
Decreases the reference count on pattern by one. If the result is zero, then pattern and all associated resources are freed. See Pattern.reference. Since 1.0
Checks whether an error has previously occurred for this pattern. Since 1.0
Sets the mode to be used for drawing outside the area of a pattern. See cairo_extend_t for details on the semantics of each extend strategy. The default extend mode is CAIRO_EXTEND_NONE for surface patterns and CAIRO_EXTEND_PAD for gradient patterns. Since 1.0
Gets the current extend mode for a pattern. See cairo_extend_t for details on the semantics of each extend strategy. Since 1.0
Sets the filter to be used for resizing when using this pattern. See cairo_filter_t for details on each filter. * Note that you might want to control filtering even when you do not have an explicit cairo_pattern_t object, (for example when using cairo_set_source_surface()). In these cases, it is convenient to use cairo_get_source() to get access to the pattern that cairo Since 1.0
Gets the current filter for a pattern. See cairo_filter_t for details on each filter. Since 1.0
Sets the pattern's transformation matrix to matrix. This matrix is a transformation from user space to pattern space. When a pattern is first created it always has the identity matrix for its transformation matrix, which means that pattern space is initially identical to user space. Important: Please note that the direction of this transformation matrix is from user space to pattern space. This means that if you imagine the flow from a pattern to user space (and on to device space), then coordinates in that flow will be transformed by the inverse of the pattern matrix. For example, if you want to make a pattern appear twice as large as Since 1.0
Stores the pattern's transformation matrix into matrix. Since 1.0
This function returns the type a pattern. See cairo_pattern_type_t for available types. Since 1.2
Returns the current reference count of pattern. Since 1.4
Attach user data to pattern. To remove user data from a surface, call this function with the key that was used to set it and NULL for data. Since 1.4
Return user data previously attached to pattern using the specified key. If no user data has been attached with the given key this function returns NULL. Since 1.4
The raster source provides the ability to supply arbitrary pixel data whilst rendering. The pixels are queried at the time of rasterisation by means of user callback functions, allowing for the ultimate flexibility. For example, in handling compressed image sources, you may keep a MRU cache of decompressed images and decompress sources on the fly and discard old ones to conserve memory.
For the raster source to be effective, you must at least specify the acquire and release callbacks which are used to retrieve the pixel data for the region of interest and demark when it can be freed afterwards. Other callbacks are provided for when the pattern is copied temporarily during rasterisation, or more permanently as a snapshot in order to keep the pixel data available for printing.