Plasma
paintutils.cpp
Go to the documentation of this file.
55 //TODO: we should have shadowText methods that paint the results directly into a QPainter passed in
56 QPixmap shadowText(QString text, QColor textColor, QColor shadowColor, QPoint offset, int radius)
61 QPixmap shadowText(QString text, const QFont &font, QColor textColor, QColor shadowColor, QPoint offset, int radius)
86 QImage img(textRect.size() + QSize(radius * 2, radius * 2), QImage::Format_ARGB32_Premultiplied);
166 path.quadTo(rect.right(), rect.bottom(), rect.right() - radius, rect.bottom()); // Bottom right corner
168 path.quadTo(rect.left(), rect.bottom(), rect.left(), rect.bottom() - radius); // Bottom left corner
void detach()
QSize size() const
QSize size() const
QRect toRect() const
int width() const
bool end()
void fillRect(const QRectF &rectangle, const QBrush &brush)
void setCompositionMode(CompositionMode mode)
QPixmap texturedText(const QString &text, const QFont &font, Plasma::Svg *texture)
Definition: paintutils.cpp:107
void fill(const QColor &color)
void closeSubpath()
Display * display()
QPixmap fromImage(const QImage &image, QFlags< Qt::ImageConversionFlag > flags)
void drawHalo(QPainter *painter, const QRectF &rect)
Definition: paintutils.cpp:154
qreal top() const
int x() const
int y() const
bool isNull() const
virtual QPaintEngine * paintEngine() const =0
bool hasAlphaChannel() const
qreal left() const
int x() const
int y() const
void moveTo(int x, int y)
qreal bottom() const
QRect boundingRect(QChar ch) const
void setFont(const QFont &font)
QPainterPath roundedRectangle(const QRectF &rect, qreal radius)
Returns a nicely rounded rectanglular path for painting.
Definition: paintutils.cpp:159
void fill(uint pixelValue)
Q_INVOKABLE void paint(QPainter *painter, const QPointF &point, const QString &elementID=QString())
Paints all or part of the SVG represented by this object.
Definition: svg.cpp:655
void setPen(const QColor &color)
void lineTo(const QPointF &endPoint)
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
bool isEmpty() const
QRect rect() const
void drawText(const QPointF &position, const QString &text)
QPoint center() const
Qt::HANDLE handle() const
QRect translated(int dx, int dy) const
QPixmap shadowText(QString text, QColor textColor, QColor shadowColor, QPoint offset, int radius)
Definition: paintutils.cpp:56
void shadowBlur(QImage &image, int radius, const QColor &color)
Creates a blurred shadow of the supplied image.
Definition: paintutils.cpp:38
QRect adjusted(int dx1, int dy1, int dx2, int dy2) const
qreal right() const
bool isNull() const
int height() const
int width() const
void drawImage(const QRectF &target, const QImage &image, const QRectF &source, QFlags< Qt::ImageConversionFlag > flags)
QSize expandedTo(const QSize &otherSize) const
Qt::HANDLE x11PictureHandle() const
int height() const
QPoint topLeft() const
QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount)
Blends a pixmap into another.
Definition: paintutils.cpp:208
void setAlphaF(qreal alpha)
bool hasFeature(QFlags< QPaintEngine::PaintEngineFeature > feature) const
void centerPixmaps(QPixmap &from, QPixmap &to)
center two pixmap together in the biggest rectangle
Definition: paintutils.cpp:174
void quadTo(const QPointF &c, const QPointF &endPoint)
bool begin(QPaintDevice *device)
QRect rect() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.