~macslow/cairo-countdown/trunk

« back to all changes in this revision

Viewing changes to raico-blur.h

  • Committer: Mirco Müller
  • Date: 2014-04-18 17:38:09 UTC
  • Revision ID: mirco.mueller@ubuntu.com-20140418173809-f9g2s6fjnr938few
Use pixman-convolution-based 2-pass 1D-gaussian-blur in ANSI-C version... started porting that to the Python version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
////////////////////////////////////////////////////////////////////////////////
2
 
//3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
3
 
//      10        20        30        40        50        60        70        80
4
 
//
5
 
// notify-osd
6
 
//
7
 
// raico-blur.h - implements public API for blurring cairo image-surfaces
8
 
//
9
 
// Copyright 2009 Canonical Ltd.
10
 
//
11
 
// Authors:
12
 
//    Mirco "MacSlow" Mueller <mirco.mueller@canonical.com>
13
 
//
14
 
// This program is free software: you can redistribute it and/or modify it
15
 
// under the terms of the GNU General Public License version 3, as published
16
 
// by the Free Software Foundation.
17
 
//
18
 
// This program is distributed in the hope that it will be useful, but
19
 
// WITHOUT ANY WARRANTY; without even the implied warranties of
20
 
// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
21
 
// PURPOSE.  See the GNU General Public License for more details.
22
 
//
23
 
// You should have received a copy of the GNU General Public License along
24
 
// with this program.  If not, see <http://www.gnu.org/licenses/>.
25
 
//
26
 
////////////////////////////////////////////////////////////////////////////////
27
 
 
28
 
#ifndef _RAICO_BLUR_H
29
 
#define _RAICO_BLUR_H
30
 
 
31
 
#include <glib.h>
32
 
#include <cairo.h>
33
 
 
34
 
typedef enum _raico_blur_quality_t
35
 
{
36
 
        RAICO_BLUR_QUALITY_LOW = 0, // low quality, but fast, maybe interactive
37
 
        RAICO_BLUR_QUALITY_MEDIUM,  // compromise between speed and quality
38
 
        RAICO_BLUR_QUALITY_HIGH     // quality before speed
39
 
} raico_blur_quality_t;
40
 
 
41
 
typedef struct _raico_blur_private_t raico_blur_private_t;
42
 
 
43
 
typedef struct _raico_blur_t
44
 
{
45
 
        raico_blur_private_t* priv;
46
 
} raico_blur_t;
47
 
 
48
 
raico_blur_t*
49
 
raico_blur_create (raico_blur_quality_t quality);
50
 
 
51
 
raico_blur_quality_t
52
 
raico_blur_get_quality (raico_blur_t* blur);
53
 
 
54
 
void
55
 
raico_blur_set_quality (raico_blur_t*        blur,
56
 
                        raico_blur_quality_t quality);
57
 
 
58
 
guint
59
 
raico_blur_get_radius (raico_blur_t* blur);
60
 
 
61
 
void
62
 
raico_blur_set_radius (raico_blur_t* blur,
63
 
                       guint         radius);
64
 
 
65
 
void
66
 
raico_blur_apply (raico_blur_t*    blur,
67
 
                  cairo_surface_t* surface);
68
 
 
69
 
void
70
 
raico_blur_destroy (raico_blur_t* blur);
71
 
 
72
 
#endif // _RAICO_BLUR_H
73