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

QPixmapColorizeFilter Class Reference
[
QtGui module]

The QPixmapColorizeFilter class provides a colorizing filtering for the pixmap. More...

 #include <QPixmapColorizeFilter>

Inherits QPixmapFilter.

This class was introduced in Qt 4.5.

Public Functions

Static Public Members


Detailed Description

The QPixmapColorizeFilter class provides a colorizing filtering for the pixmap.

When QPixmapColorizeFilter is applied all of the effective area pixels are colorized. The filter first grayscales the effective area of the pixmap and then converts those to colorized values using QPainter::CompositionMode_Screen with the chosen color. 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().

QPixmapColorizeFilter * QPixmapColorizeFilter::createGrayscaleFilter ()   [static]

void QPixmapColorizeFilter::setColor ( const QColor & color )

Sets the color of the colorize filter.

See also color().


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