![]() |
Home · All Namespaces · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QPixmapDropShadowFilter class is a convenience class for drawing pixmaps with drop shadows. More...
#include <QPixmapDropShadowFilter>
Inherits QPixmapFilter.
The QPixmapDropShadowFilter class is a convenience class for drawing pixmaps with drop shadows.
The drop shadow is produced by taking a copy of the source pixmap and applying a color to the copy using a QPainter::CompositionMode_DestinationIn operation. This produces a homogenously colored pixmap which is then drawn using a QPixmapConvolutionFilter at an offset. The original pixmap is drawn on top.
The QPixmapDropShadowFilter class provides some customization options to specify how the dropshadow should apear. The color of the drop shadow can be modified using the setColor() function, the drop shadow offset can be modified using the setOffset() function and the blur radius of the drop shadow can be changed through the setBlurRadius() function.
By default, the drop shadow is a dark gray shadow, blurred with a radius of 1 at an offset of 8 pixels towards the lower right.
Example:
QPixmapDropShadowFilter *myFilter = new QPixmapDropShadowFilter; myFilter->draw(painter, QPoint(0, 0), originalPixmap);
Constructs drop shadow filter.
Destroys drop shadow filter.
Gets the radius in pixels of the blur on the drop shadow. Smaller radius means sharper shadow.
See also setBlurRadius().
Reimplemented from QPixmapFilter.
Gets the color of the drop shadow.
See also setColor().
Reimplemented from QPixmapFilter.
Gets the shadow offset in pixels.
See also setOffset().
Sets the radius in pixels of the blur on the drop shadow. Smaller radius means sharper shadow.
See also blurRadius().
Sets the color of the drop shadow.
See also color().
Sets shadow the offset in pixels.
See also offset().
This is an overloaded member function, provided for convenience.
Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.5.0-tp1 |