• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • sources
  • kde-4.12
  • kdelibs
  • plasma
paintutils.h
Go to the documentation of this file.
1 /*
2  * Copyright 2005 by Aaron Seigo <aseigo@kde.org>
3  * Copyright 2008 by Andrew Lake <jamboarder@yahoo.com>
4  *
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.
9  *
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
14  *
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.
19  */
20 
21 #ifndef PLASMA_PAINTUTILS_H
22 #define PLASMA_PAINTUTILS_H
23 
24 #include <QtGui/QApplication>
25 #include <QtGui/QGraphicsItem>
26 #include <QtGui/QPainterPath>
27 
28 #include <plasma/plasma_export.h>
29 #include "theme.h"
30 
33 namespace Plasma
34 {
35 
36 class Svg;
37 
41 namespace PaintUtils
42 {
43 
47 PLASMA_EXPORT void shadowBlur(QImage &image, int radius, const QColor &color);
48 
53 PLASMA_EXPORT QPixmap shadowText(QString text,
54  const QFont &font,
55  QColor textColor = Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor),
56  QColor shadowColor = Plasma::Theme::defaultTheme()->color(Plasma::Theme::BackgroundColor),
57  QPoint offset = QPoint(1,1),
58  int radius = 2);
59 
60 PLASMA_EXPORT QPixmap shadowText(QString text,
61  QColor textColor = Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor),
62  QColor shadowColor = Plasma::Theme::defaultTheme()->color(Plasma::Theme::BackgroundColor),
63  QPoint offset = QPoint(1,1),
64  int radius = 2);
65 
66 PLASMA_EXPORT QPixmap texturedText(const QString &text, const QFont &font, Plasma::Svg *texture);
67 
68 PLASMA_EXPORT void drawHalo(QPainter *painter, const QRectF &rect);
69 
73 PLASMA_EXPORT QPainterPath roundedRectangle(const QRectF &rect, qreal radius);
74 
79 PLASMA_EXPORT void centerPixmaps(QPixmap &from, QPixmap &to);
80 
84 PLASMA_EXPORT QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount);
85 
86 } // PaintUtils namespace
87 
88 } // Plasma namespace
89 
90 #endif
Plasma::PaintUtils::texturedText
QPixmap texturedText(const QString &text, const QFont &font, Plasma::Svg *texture)
Definition: paintutils.cpp:107
Plasma::Theme::TextColor
the text color to be used by items resting on the background
Definition: theme.h:63
Plasma::PaintUtils::drawHalo
void drawHalo(QPainter *painter, const QRectF &rect)
Definition: paintutils.cpp:154
theme.h
Plasma::PaintUtils::roundedRectangle
QPainterPath roundedRectangle(const QRectF &rect, qreal radius)
Returns a nicely rounded rectanglular path for painting.
Definition: paintutils.cpp:159
Plasma::PaintUtils::shadowText
QPixmap shadowText(QString text, QColor textColor, QColor shadowColor, QPoint offset, int radius)
Definition: paintutils.cpp:56
Plasma::PaintUtils::shadowBlur
void shadowBlur(QImage &image, int radius, const QColor &color)
Creates a blurred shadow of the supplied image.
Definition: paintutils.cpp:38
Plasma::Theme::defaultTheme
static Theme * defaultTheme()
Singleton pattern accessor.
Definition: theme.cpp:544
Plasma::PaintUtils::transition
QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount)
Blends a pixmap into another.
Definition: paintutils.cpp:208
Plasma::PaintUtils::centerPixmaps
void centerPixmaps(QPixmap &from, QPixmap &to)
center two pixmap together in the biggest rectangle
Definition: paintutils.cpp:174
Plasma::Theme::BackgroundColor
the default background color
Definition: theme.h:66
Plasma::Svg
A theme aware image-centric SVG class.
Definition: svg.h:56
plasma_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal