Home · All Namespaces · All Classes · Main Classes · Grouped Classes · Modules · Functions

QPixmapColorizeFilter Class Reference
[QtGui module]

The QPixmapColorizeFilter class provides colorizing filtering for pixmaps. More...

 #include <QPixmapColorizeFilter>

Inherits QPixmapFilter.

This class was introduced in Qt 4.5.

Public Functions


Detailed Description

The QPixmapColorizeFilter class provides colorizing filtering for pixmaps.

A colorize filter gives the pixmap a tint of its color(). The filter first grayscales the pixmap and then converts those to colorized values using QPainter::CompositionMode_Screen with the chosen color. The alpha-channel is not changed.

Example:

 QPixmapColorizeFilter *myFilter = new QPixmapColorFilter;
 myFilter->setColor(QColor(128, 0, 0));
 myFilter->draw(painter, QPoint(0, 0), originalPixmap);

See also QPainter::CompositionMode.


Member Function Documentation

QPixmapColorizeFilter::QPixmapColorizeFilter ()

Constructs an pixmap colorize filter.

Default color value for colorizing is QColor(0, 0, 192).

QColor QPixmapColorizeFilter::color () const

Gets the color of the colorize filter.

See also setColor().

void QPixmapColorizeFilter::setColor ( const QColor & color )

Sets the color of the colorize filter to the color specified.

See also color().


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.5.0-rc1