cairo_pattern_type_t is used to describe the type of a given pattern.
The type of a pattern is determined by the function used to create
it. The Pattern.createRgb and Pattern.createRgba
functions create SOLID patterns. The remaining
cairo_pattern_create functions map to pattern types in obvious
ways.
The pattern type can be queried with Pattern.getType
Most cairo_pattern_t functions can be called with a pattern of any
type, (though trying to change the extend or filter for a solid
pattern will have no effect). A notable exception is
Pattern.addColorStopRgb and
Pattern.addColorStopRgba which must only be called with
gradient patterns (either LINEAR or RADIAL). Otherwise the pattern
will be shutdown and put into an error state.
New entries may be added in future versions.
CAIRO_PATTERN_TYPE_SOLID
The pattern is a solid (uniform)
color. It may be opaque or translucent, since 1.2.
CAIRO_PATTERN_TYPE_SURFACE
The pattern is a based on a surface (an image), since 1.2.
CAIRO_PATTERN_TYPE_LINEAR
The pattern is a linear gradient, since 1.2.
CAIRO_PATTERN_TYPE_RADIAL
The pattern is a radial gradient, since 1.2.
CAIRO_PATTERN_TYPE_MESH
The pattern is a mesh, since 1.12.
CAIRO_PATTERN_TYPE_RASTER_SOURCE
The pattern is a user pattern providing raster data, since 1.12.
Since 1.2
cairo_pattern_type_t is used to describe the type of a given pattern. The type of a pattern is determined by the function used to create it. The Pattern.createRgb and Pattern.createRgba functions create SOLID patterns. The remaining cairo_pattern_create functions map to pattern types in obvious ways. The pattern type can be queried with Pattern.getType Most cairo_pattern_t functions can be called with a pattern of any type, (though trying to change the extend or filter for a solid pattern will have no effect). A notable exception is Pattern.addColorStopRgb and Pattern.addColorStopRgba which must only be called with gradient patterns (either LINEAR or RADIAL). Otherwise the pattern will be shutdown and put into an error state. New entries may be added in future versions. CAIRO_PATTERN_TYPE_SOLID The pattern is a solid (uniform) color. It may be opaque or translucent, since 1.2. CAIRO_PATTERN_TYPE_SURFACE The pattern is a based on a surface (an image), since 1.2. CAIRO_PATTERN_TYPE_LINEAR The pattern is a linear gradient, since 1.2. CAIRO_PATTERN_TYPE_RADIAL The pattern is a radial gradient, since 1.2. CAIRO_PATTERN_TYPE_MESH The pattern is a mesh, since 1.12. CAIRO_PATTERN_TYPE_RASTER_SOURCE The pattern is a user pattern providing raster data, since 1.12. Since 1.2