2 * Copyright 2005 by Aaron Seigo <aseigo@kde.org>
3 * Copyright 2008 by Andrew Lake <jamboarder@yahoo.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Library General Public License as
7 * published by the Free Software Foundation; either version 2, or
8 * (at your option) any later version.
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
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.
21 #ifndef PLASMA_PAINTUTILS_H
22 #define PLASMA_PAINTUTILS_H
24 #include <QtGui/QApplication>
25 #include <QtGui/QGraphicsItem>
26 #include <QtGui/QPainterPath>
28 #include <plasma/plasma_export.h>
31 /** @headerfile plasma/paintutils.h <Plasma/PaintUtils> */
37 * Namespace for all Image Effects specific to Plasma
43 * Creates a blurred shadow of the supplied image.
45 PLASMA_EXPORT
void shadowBlur(QImage
&image
, int radius
, const QColor
&color
);
48 * Returns a pixmap containing text with blurred shadow.
49 * Text and shadow colors default to Plasma::Theme colors.
51 PLASMA_EXPORT QPixmap
shadowText(QString text
,
53 QColor textColor
= Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor
),
54 QColor shadowColor
= Plasma::Theme::defaultTheme()->color(Plasma::Theme::BackgroundColor
),
55 QPoint offset
= QPoint(1,1),
58 PLASMA_EXPORT QPixmap
shadowText(QString text
,
59 QColor textColor
= Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor
),
60 QColor shadowColor
= Plasma::Theme::defaultTheme()->color(Plasma::Theme::BackgroundColor
),
61 QPoint offset
= QPoint(1,1),
65 * Returns a nicely rounded rectanglular path for painting.
67 PLASMA_EXPORT QPainterPath
roundedRectangle(const QRectF
&rect
, qreal radius
);
70 * Blends a pixmap into another
72 PLASMA_EXPORT QPixmap
transition(const QPixmap
&from
, const QPixmap
&to
, qreal amount
);
74 } // PaintUtils namespace