cairo_dither_t

Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images (e.g. for gradients). Ordered dithering applies a precomputed threshold matrix to spread the errors smoothly.

#cairo_dither_t is modeled on pixman dithering algorithm choice. As of Pixman 0.40, FAST corresponds to a 8x8 ordered bayer noise and GOOD and BEST use an ordered 64x64 precomputed blue noise.

Values

ValueMeaning
None0

No dithering.

Default1

Default choice at cairo compile time. Currently NONE.

Fast2

Fastest dithering algorithm supported by the backend

Good3

An algorithm with smoother dithering than FAST

Best4

Best algorithm available in the backend