summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2010-02-18 09:10:39 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2010-02-18 10:03:34 (GMT)
commit08a40e6d4ef085c13d95c300c4df6b19caf7c483 (patch)
tree413bee862222bfa258c27477199aade27ecd278f /src
parenta359db8f939ccbe8ce49c2ef71ff4585ab69c15e (diff)
downloadQt-08a40e6d4ef085c13d95c300c4df6b19caf7c483.zip
Qt-08a40e6d4ef085c13d95c300c4df6b19caf7c483.tar.gz
Qt-08a40e6d4ef085c13d95c300c4df6b19caf7c483.tar.bz2
Documented behavior of blur effect radius and drop shadow offset.
Our graphics effects are always done in device coordinates (unless they can be done in logical coordinates with the same result as an optimization, e.g. opacity effects). Reviewed-by: Andy Shaw
Diffstat (limited to 'src')
-rw-r--r--src/gui/effects/qgraphicseffect.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index 7d1d03d..ce4ce6a 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -726,7 +726,8 @@ void QGraphicsColorizeEffect::draw(QPainter *painter)
elements. The level of detail can be modified using the setBlurRadius()
function. Use setBlurHints() to choose the blur hints.
- By default, the blur radius is 5 pixels.
+ By default, the blur radius is 5 pixels. The blur radius is specified in
+ device coordinates.
\img graphicseffect-blur.png
@@ -781,6 +782,9 @@ QGraphicsBlurEffect::~QGraphicsBlurEffect()
radius results in a more blurred appearance.
By default, the blur radius is 5 pixels.
+
+ The radius is given in device coordinates, meaning it is
+ unaffected by scale.
*/
qreal QGraphicsBlurEffect::blurRadius() const
{
@@ -884,7 +888,8 @@ void QGraphicsBlurEffect::draw(QPainter *painter)
By default, the drop shadow is a semi-transparent dark gray
(QColor(63, 63, 63, 180)) shadow, blurred with a radius of 1 at an offset
- of 8 pixels towards the lower right.
+ of 8 pixels towards the lower right. The drop shadow offset is specified
+ in device coordinates.
\img graphicseffect-drop-shadow.png
@@ -913,6 +918,9 @@ QGraphicsDropShadowEffect::~QGraphicsDropShadowEffect()
By default, the offset is 8 pixels towards the lower right.
+ The offset is given in device coordinates, which means it is
+ unaffected by scale.
+
\sa xOffset(), yOffset(), blurRadius(), color()
*/
QPointF QGraphicsDropShadowEffect::offset() const