File indexing completed on 2024-04-28 16:55:26
0001 /* 0002 * shadowengine.h - Emerald window decoration for KDE 0003 * 0004 * Copyright (c) 2010 Christoph Feck <christoph@maxiom.de> 0005 * 0006 * This program is free software; you can redistribute it and/or modify 0007 * it under the terms of the GNU General Public License as published by 0008 * the Free Software Foundation; either version 2 of the License, or 0009 * (at your option) any later version. 0010 * 0011 * This program is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 * GNU General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU General Public License 0017 * along with this program; if not, write to the Free Software 0018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 0019 * 0020 */ 0021 0022 #ifndef SMARAGD_SHADOWENGINE_H 0023 #define SMARAGD_SHADOWENGINE_H 1 0024 0025 #include <QPainter> 0026 0027 namespace Smaragd 0028 { 0029 0030 class ShadowSettings 0031 { 0032 public: 0033 int radius; 0034 QColor color; 0035 int offsetX; 0036 int offsetY; 0037 int size; 0038 qreal linearDecay; 0039 qreal exponentialDecay; 0040 }; 0041 0042 QImage createShadowImage(const ShadowSettings &settings); 0043 void paintShadow(QPainter *p, const QRect &rect, const ShadowSettings &settings, const QImage &shadowImage); 0044 0045 }; // namespace Smaragd 0046 0047 #endif 0048