1 | /* |
2 | * Copyright (C) 2012 Canonical Ltd |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser General Public |
15 | * License along with this library; if not, write to the Free |
16 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, |
17 | * MA 02110-1301, USA. |
18 | * |
19 | * Authored by Andrea Cimitan <andrea.cimitan@canonical.com> |
20 | * Original code from Mirco Mueller <mirco.mueller@canonical.com> |
21 | * |
22 | */ |
23 | |
24 | #ifndef _GSK_CAIRO_BLUR_H |
25 | #define _GSK_CAIRO_BLUR_H |
26 | |
27 | #include <gdk/gdk.h> |
28 | #include <cairo.h> |
29 | |
30 | G_BEGIN_DECLS |
31 | |
32 | typedef enum { |
33 | GSK_BLUR_NONE = 0, |
34 | GSK_BLUR_X = 1<<0, |
35 | GSK_BLUR_Y = 1<<1, |
36 | GSK_BLUR_REPEAT = 1<<2 |
37 | } GskBlurFlags; |
38 | |
39 | void gsk_cairo_blur_surface (cairo_surface_t *surface, |
40 | double radius, |
41 | GskBlurFlags flags); |
42 | int gsk_cairo_blur_compute_pixels (double radius) G_GNUC_CONST; |
43 | |
44 | cairo_t * gsk_cairo_blur_start_drawing (cairo_t *cr, |
45 | float radius, |
46 | GskBlurFlags blur_flags); |
47 | cairo_t * gsk_cairo_blur_finish_drawing (cairo_t *cr, |
48 | float radius, |
49 | const GdkRGBA *color, |
50 | GskBlurFlags blur_flags); |
51 | |
52 | G_END_DECLS |
53 | |
54 | #endif /* _GSK_CAIRO_BLUR_H */ |
55 | |