4 * An OpenGL based 'interactive canvas' library.
6 * Copyright (C) 2012 Intel Corporation
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
23 #error "Only <clutter/clutter.h> can be included directly."
26 #ifndef __CLUTTER_CAIRO_H__
27 #define __CLUTTER_CAIRO_H__
29 #include <clutter/clutter-types.h>
34 * CLUTTER_CAIRO_FORMAT_ARGB32:
36 * The #CoglPixelFormat to be used when uploading image data from
37 * and to a Cairo image surface using %CAIRO_FORMAT_ARGB32 and
38 * %CAIRO_FORMAT_RGB24 as #cairo_format_t.
43 /* Cairo stores the data in native byte order as ARGB but Cogl's pixel
44 * formats specify the actual byte order. Therefore we need to use a
45 * different format depending on the architecture
47 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
48 #define CLUTTER_CAIRO_FORMAT_ARGB32 (COGL_PIXEL_FORMAT_BGRA_8888_PRE)
50 #define CLUTTER_CAIRO_FORMAT_ARGB32 (COGL_PIXEL_FORMAT_ARGB_8888_PRE)
53 void clutter_cairo_clear (cairo_t *cr);
54 void clutter_cairo_set_source_color (cairo_t *cr,
55 const ClutterColor *color);
59 #endif /* __CLUTTER_CAIRO_H__ */