KIO
imagefilter_p.h
Go to the documentation of this file.
00001 //krazy:exclude=copyright (email of Maxim is missing) 00002 /* 00003 This file is a part of the KDE project 00004 00005 Copyright © 2006 Zack Rusin <zack@kde.org> 00006 Copyright © 2006-2007, 2008 Fredrik Höglund <fredrik@kde.org> 00007 00008 The stack blur algorithm was invented by Mario Klingemann <mario@quasimondo.com> 00009 00010 This implementation is based on the version in Anti-Grain Geometry Version 2.4, 00011 Copyright © 2002-2005 Maxim Shemanarev (http://www.antigrain.com) 00012 00013 Redistribution and use in source and binary forms, with or without 00014 modification, are permitted provided that the following conditions 00015 are met: 00016 00017 1. Redistributions of source code must retain the above copyright 00018 notice, this list of conditions and the following disclaimer. 00019 2. Redistributions in binary form must reproduce the above copyright 00020 notice, this list of conditions and the following disclaimer in the 00021 documentation and/or other materials provided with the distribution. 00022 00023 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00024 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00025 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00026 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00027 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00028 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00029 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00030 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00032 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 */ 00034 00035 #ifndef KIO_IMAGEFILTER_P_H 00036 #define KIO_IMAGEFILTER_P_H 00037 00038 #include <kio/global.h> 00039 00040 class QImage; 00041 class QColor; 00042 namespace KIO { 00043 00044 class KIO_EXPORT ImageFilter 00045 { 00046 public: 00047 // Blurs the alpha channel of the image and recolors it to the specified color. 00048 // The image must have transparent padding on all sides, or the shadow will be clipped. 00049 static void shadowBlur(QImage &image, float radius, const QColor &color); 00050 }; 00051 00052 } 00053 00054 #endif 00055
KDE 4.6 API Reference