![]() |
Home · All Namespaces · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QPixmapConvolutionFilter class provides convolution filtering for the pixmap. More...
#include <QPixmapConvolutionFilter>
Inherits QPixmapFilter.
This class was introduced in Qt 4.5.
The QPixmapConvolutionFilter class provides convolution filtering for the pixmap.
When QPixmapConvolutionFilter is applied the effective area is processed with convolution filter. In convolution the pixel value is calculated from the neighboring pixels based on the weightening convolution kernel.
Example:
QPixmapConvolutionFilter *myFilter = new QPixmapConvolutionFilter; qreal kernel[] = { 0.0,-1.0, 0.0, -1.0, 5.0,-1.0, 0.0,-1.0, 0.0 }; myFilter->setConvolutionKernel(kernel, 3, 3); myFilter->draw(painter, QPoint(0, 0), originalPixmap);
Constructs a pixmap convolution filter.
By default there is no convolution kernel.
Destructor of pixmap convolution filter.
Sets convolution kernel with the given number of rows and columns. Values from kernel are copied to internal data structure.
To preserve the intensity of the pixmap, the sum of all the values in the convolution kernel should add up to 1.0. A sum greater than 1.0 produces a lighter result and a sum less than 1.0 produces a darker and transparent result.
Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.5.0-beta1 |