]> git.sur5r.net Git - minitube/blob - src/thlibrary/imageblur.h
Initial import
[minitube] / src / thlibrary / imageblur.h
1 /*
2  *   This is an adaptation of Jani Huhtanen Exponential blur code.
3  *
4  *   Copyright 2007 Jani Huhtanen <jani.huhtanen@tut.fi>
5  *
6  *   This program is free software; you can redistribute it and/or modify
7  *   it under the terms of the GNU Library General Public License version 2 as
8  *   published by the Free Software Foundation
9  *
10  *   This program is distributed in the hope that it will be useful,
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *   GNU General Public License for more details
14  *
15  *   You should have received a copy of the GNU Library General Public
16  *   License along with this program; if not, write to the
17  *   Free Software Foundation, Inc.,
18  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  */
20
21 #ifndef _KDE_PLASMA_BLUR_H_
22 #define _KDE_PLASMA_BLUR_H_
23
24 class QImage;
25
26 class ImageBlur {
27         public:
28                 ImageBlur (QImage *image, int aprec, int zprec);
29                 ~ImageBlur();
30
31         public:
32                 void expblur (int radius);
33
34         public:
35                 static void expblur (QImage *image, int aprec, int zprec, int radius);
36
37         private:
38                 void blurcol (int col, int alpha);
39                 void blurrow (int line, int alpha);
40
41                 void blurinner (unsigned char *bptr,
42                                                 int &zR, int &zG, int &zB, int &zA,
43                                                 int alpha);
44
45         private:
46                 QImage *m_image;
47                 int m_aprec;
48                 int m_zprec;
49 };
50
51 #endif /* !_KDE_PLASMA_BLUR_H_ */
52