Patterns

Patterns — Gradients and filtered sources

Synopsis




typedef     cairo_pattern_t;
enum        cairo_extend_t;
enum        cairo_filter_t;

Description

Details

cairo_pattern_t

typedef struct _cairo_pattern cairo_pattern_t;


enum cairo_extend_t

typedef enum _cairo_extend {
    CAIRO_EXTEND_NONE,
    CAIRO_EXTEND_REPEAT,
    CAIRO_EXTEND_REFLECT,
    CAIRO_EXTEND_PAD
} cairo_extend_t;

cairo_extend_t is used to describe how the area outside of a pattern will be drawn.

CAIRO_EXTEND_NONE pixels outside of the source pattern are fully transparent
CAIRO_EXTEND_REPEAT the pattern is tiled by repeating
CAIRO_EXTEND_REFLECT the pattern is tiled by reflecting at the edges
CAIRO_EXTEND_PAD pixels outside of the pattern copy the closest pixel from the source (since cairo 1.2)

enum cairo_filter_t

typedef enum _cairo_filter {
    CAIRO_FILTER_FAST,
    CAIRO_FILTER_GOOD,
    CAIRO_FILTER_BEST,
    CAIRO_FILTER_NEAREST,
    CAIRO_FILTER_BILINEAR,
    CAIRO_FILTER_GAUSSIAN
} cairo_filter_t;