Package: cairo

Enum cairo-pattern-type-t

Details

The cairo-pattern-type-t enumeration 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 functions cairo-pattern-create-rgb and cairo-pattern-create-rgba create :solid patterns. The remaining cairo-pattern-create functions map to pattern types in obvious ways.

The pattern type can be queried with the function cairo-pattern-get-type.

Most Cairo pattern 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 are the functions cairo-pattern-add-color-stop-rgb and cairo-pattern-add-color-stop-rgba 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.
(defcenum cairo-pattern-type-t
  :solid
  :surface
  :linear
  :radial
  :mesh
  :raster-source)  
:solid
The pattern is a solid (uniform) color. It may be opaque or translucent.
:surface
The pattern is a based on a surface (an image).
:linear
The pattern is a linear gradient.
:radial
The pattern is a radial gradient.
:mesh
The pattern is a mesh.
:raster-source
The pattern is a user pattern providing raster data.
 

See also

2020-12-12