libplasma
paintutils.h
Go to the documentation of this file.00001 /* 00002 * Copyright 2005 by Aaron Seigo <aseigo@kde.org> 00003 * Copyright 2008 by Andrew Lake <jamboarder@yahoo.com> 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU Library General Public License as 00007 * published by the Free Software Foundation; either version 2, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details 00014 * 00015 * You should have received a copy of the GNU Library General Public 00016 * License along with this program; if not, write to the 00017 * Free Software Foundation, Inc., 00018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef PAINTUTILS_H 00022 #define PAINTUTILS_H 00023 00024 #include <QtGui/QGraphicsItem> 00025 #include <QtGui/QPainterPath> 00026 00027 #include <plasma/plasma_export.h> 00028 #include "theme.h" 00029 00030 namespace Plasma 00031 { 00032 00036 namespace PaintUtils 00037 { 00038 00042 PLASMA_EXPORT void shadowBlur(QImage &image, int radius, const QColor &color); 00043 00048 PLASMA_EXPORT QPixmap shadowText(QString text, 00049 QColor textColor = Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor), 00050 QColor shadowColor = Plasma::Theme::defaultTheme()->color(Plasma::Theme::BackgroundColor), 00051 QPoint offset = QPoint(1,1), 00052 int radius = 2); 00053 00057 PLASMA_EXPORT QPainterPath roundedRectangle(const QRectF& rect, qreal radius); 00058 00059 } // PaintUtils namespace 00060 00061 } // Plasma namespace 00062 00063 #endif