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

Plasma

  • 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
33namespace Plasma
34{
35
36class Svg;
37
41namespace PaintUtils
42{
43
47PLASMA_EXPORT void shadowBlur(QImage &image, int radius, const QColor &color);
48
53PLASMA_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
60PLASMA_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
66PLASMA_EXPORT QPixmap texturedText(const QString &text, const QFont &font, Plasma::Svg *texture);
67
68PLASMA_EXPORT void drawHalo(QPainter *painter, const QRectF &rect);
69
73PLASMA_EXPORT QPainterPath roundedRectangle(const QRectF &rect, qreal radius);
74
79PLASMA_EXPORT void centerPixmaps(QPixmap &from, QPixmap &to);
80
84PLASMA_EXPORT QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount);
85
86} // PaintUtils namespace
87
88} // Plasma namespace
89
90#endif
Plasma::Svg
A theme aware image-centric SVG class.
Definition: svg.h:57
Plasma::Theme::defaultTheme
static Theme * defaultTheme()
Singleton pattern accessor.
Definition: theme.cpp:544
Plasma::Theme::BackgroundColor
@ BackgroundColor
the default background color
Definition: theme.h:66
Plasma::Theme::TextColor
@ TextColor
the text color to be used by items resting on the background
Definition: theme.h:63
Plasma::PaintUtils::roundedRectangle
QPainterPath roundedRectangle(const QRectF &rect, qreal radius)
Returns a nicely rounded rectanglular path for painting.
Definition: paintutils.cpp:159
Plasma::PaintUtils::texturedText
QPixmap texturedText(const QString &text, const QFont &font, Plasma::Svg *texture)
Definition: paintutils.cpp:107
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::PaintUtils::centerPixmaps
void centerPixmaps(QPixmap &from, QPixmap &to)
center two pixmap together in the biggest rectangle
Definition: paintutils.cpp:174
Plasma::PaintUtils::shadowText
QPixmap shadowText(QString text, QColor textColor, QColor shadowColor, QPoint offset, int radius)
Definition: paintutils.cpp:56
Plasma::PaintUtils::transition
QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount)
Blends a pixmap into another.
Definition: paintutils.cpp:208
Plasma::PaintUtils::drawHalo
void drawHalo(QPainter *painter, const QRectF &rect)
Definition: paintutils.cpp:154
Plasma
Namespace for everything in libplasma.
Definition: abstractdialogmanager.cpp:25
plasma_export.h
theme.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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