![]() |
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.
This class was introduced in Qt 4.5.
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 homogeneously-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 drop shadow should appear. 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);
See also QPixmapColorizeFilter and QPixmapConvolutionFilter.
Constructs drop shadow filter.
Destroys drop shadow filter.
Returns the radius in pixels of the blur on the drop shadow.
A smaller radius results in a sharper shadow.
See also setBlurRadius(), color(), and offset().
Returns the color of the drop shadow.
See also setColor(), blurRadius(), and offset().
Returns the shadow offset in pixels.
See also setOffset(), blurRadius(), and color().
Sets the radius in pixels of the blur on the drop shadow to the radius specified.
Using a smaller radius results in a sharper shadow.
See also blurRadius(), setColor(), and setOffset().
Sets the color of the drop shadow to the color specified.
See also color(), setBlurRadius(), and setOffset().
Sets the shadow offset in pixels to the offset specified.
See also offset(), setBlurRadius(), and setColor().
This is an overloaded member function, provided for convenience.
Sets the shadow offset in pixels to be the displacement specified by the horizontal dx and vertical dy coordinates.
See also setBlurRadius() and setColor().
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.5.0-rc1 |