## Cairo integration Cairo integration — Functions for interoperating with Cairo |

## Functions

void | clutter_cairo_clear ()
void | clutter_cairo_set_source_color ()

## Types and Values

#define | CLUTTER_CAIRO_FORMAT_ARGB32

## Description

Clutter provides some utility functions for using Cairo.

## Functions

### clutter_cairo_clear ()

    void
    clutter_cairo_clear (cairo_t *cr);

Utility function to clear a Cairo context.

#### Parameters

cr | a Cairo context |

Since: 1.12

### clutter_cairo_set_source_color ()

    void
    clutter_cairo_set_source_color (cairo_t *cr,
                                    const ClutterColor *color);

Utility function for setting the source color of `cr` using a ClutterColor. This function is the equivalent of:

    1
    2
    3
    4
    5
    cairo_set_source_rgba (cr,
                           color->red / 255.0,
                           color->green / 255.0,
                           color->blue / 255.0,
                           color->alpha / 255.0);

#### Parameters

cr | a Cairo context |
color | a ClutterColor |

Since: 1.0

## Types and Values

### CLUTTER_CAIRO_FORMAT_ARGB32

    #define CLUTTER_CAIRO_FORMAT_ARGB32     (COGL_PIXEL_FORMAT_BGRA_8888_PRE)

The CoglPixelFormat to be used when uploading image data from and to a Cairo image surface using `CAIRO_FORMAT_ARGB32` and `CAIRO_FORMAT_RGB24` as cairo_format_t.

Since: 1.8