File indexing completed on 2024-04-28 04:58:03
0001 // krazy:exclude=copyright (email of Maxim is missing) 0002 /* 0003 This file is a part of the KDE project 0004 0005 SPDX-FileCopyrightText: 2006 Zack Rusin <zack@kde.org> 0006 SPDX-FileCopyrightText: 2006-2007, 2008 Fredrik Höglund <fredrik@kde.org> 0007 0008 The stack blur algorithm was invented by Mario Klingemann <mario@quasimondo.com> 0009 0010 This implementation is based on the version in Anti-Grain Geometry Version 2.4, 0011 SPDX-FileCopyrightText: 2002-2005 Maxim Shemanarev <http://www.antigrain.com> 0012 0013 SPDX-License-Identifier: BSD-2-Clause 0014 */ 0015 0016 #ifndef IMAGEFILTER_H 0017 #define IMAGEFILTER_H 0018 0019 class QImage; 0020 class QColor; 0021 0022 class ImageFilter 0023 { 0024 public: 0025 // Blurs the alpha channel of the image and recolors it to the specified color. 0026 // The image must have transparent padding on all sides, or the shadow will be clipped. 0027 static void shadowBlur(QImage &image, float radius, const QColor &color); 0028 }; 0029 0030 #endif