aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/images/FastBlur_radius1.png (renamed from doc/src/images/FastBlur_blur1.png)bin146075 -> 146075 bytes
-rw-r--r--doc/src/images/FastBlur_radius2.png (renamed from doc/src/images/FastBlur_blur2.png)bin62965 -> 62965 bytes
-rw-r--r--doc/src/images/FastBlur_radius3.png (renamed from doc/src/images/FastBlur_blur3.png)bin45502 -> 45502 bytes
-rw-r--r--doc/src/qtgraphicaleffects-fastblur.qdoc28
-rw-r--r--doc/src/snippets/FastBlur-example.qml2
-rw-r--r--src/effects/FastBlur.qml8
-rw-r--r--tests/auto/tst_qtgraphicaleffects.cpp2
-rw-r--r--tests/manual/testbed/TestFastBlur.qml8
-rw-r--r--tools/pngdumper/ItemModel.qml10
9 files changed, 30 insertions, 28 deletions
diff --git a/doc/src/images/FastBlur_blur1.png b/doc/src/images/FastBlur_radius1.png
index 43816e9..43816e9 100644
--- a/doc/src/images/FastBlur_blur1.png
+++ b/doc/src/images/FastBlur_radius1.png
Binary files differ
diff --git a/doc/src/images/FastBlur_blur2.png b/doc/src/images/FastBlur_radius2.png
index 239bee7..239bee7 100644
--- a/doc/src/images/FastBlur_blur2.png
+++ b/doc/src/images/FastBlur_radius2.png
Binary files differ
diff --git a/doc/src/images/FastBlur_blur3.png b/doc/src/images/FastBlur_radius3.png
index 6c66780..6c66780 100644
--- a/doc/src/images/FastBlur_blur3.png
+++ b/doc/src/images/FastBlur_radius3.png
Binary files differ
diff --git a/doc/src/qtgraphicaleffects-fastblur.qdoc b/doc/src/qtgraphicaleffects-fastblur.qdoc
index 6ebc344..92637a7 100644
--- a/doc/src/qtgraphicaleffects-fastblur.qdoc
+++ b/doc/src/qtgraphicaleffects-fastblur.qdoc
@@ -87,13 +87,15 @@
*/
/*!
- \qmlproperty real QtGraphicalEffects::FastBlur::blur
+ \qmlproperty real QtGraphicalEffects::FastBlur::radius
- BlurLevel defines the level of blurring, value 0.0 represents the source as
- unblurred and value 1.0 blurs the source maximally.
+ This property defines the distance of the neighboring pixels which affect
+ the blurring of an individual pixel. A larger radius increases the blur
+ effect. FastBlur algorithm may internally reduce the accuracy of the radius in order to
+ provide good rendering performance.
- The value ranges from 0.0 (no blur) to 1.0 (maximum blur). By default, the
- property is set to \c 0.0 (no blur).
+ The value ranges from 0.0 (no blur) to inf. Visual quality of the blur is reduced when
+ radius exceeds value 64. By default, the property is set to \c 0.0 (no blur).
\table
\header
@@ -101,13 +103,13 @@
\o
\o
\row
- \o \image FastBlur_blur1.png
- \o \image FastBlur_blur2.png
- \o \image FastBlur_blur3.png
+ \o \image FastBlur_radius1.png
+ \o \image FastBlur_radius2.png
+ \o \image FastBlur_radius3.png
\row
- \o \bold { blur: 0.0 }
- \o \bold { blur: 0.5 }
- \o \bold { blur: 1.0 }
+ \o \bold { radius: 0 }
+ \o \bold { radius: 32 }
+ \o \bold { radius: 64 }
\endtable
*/
@@ -141,8 +143,8 @@
\o \bold { transparentBorder: false }
\o \bold { transparentBorder: true }
\row
- \o \l blur: 1
- \o \l blur: 1
+ \o \l radius: 64
+ \o \l radius: 64
\endtable
*/
diff --git a/doc/src/snippets/FastBlur-example.qml b/doc/src/snippets/FastBlur-example.qml
index 30c2e4f..0991265 100644
--- a/doc/src/snippets/FastBlur-example.qml
+++ b/doc/src/snippets/FastBlur-example.qml
@@ -57,7 +57,7 @@ Item {
FastBlur {
anchors.fill: bug
source: bug
- blur: 0.5
+ radius: 32
}
}
//! [example]
diff --git a/src/effects/FastBlur.qml b/src/effects/FastBlur.qml
index 1b2bb60..cb92e94 100644
--- a/src/effects/FastBlur.qml
+++ b/src/effects/FastBlur.qml
@@ -44,7 +44,7 @@ import "internal"
Item {
id: rootItem
property variant source
- property real blur: 0.0
+ property real radius: 0.0
property bool transparentBorder: false
property bool cached: false
@@ -60,7 +60,7 @@ Item {
sourceItem: shaderItem
live: true
hideSource: visible
- smooth: rootItem.blur > 0
+ smooth: rootItem.radius > 0
}
property string __internalBlurFragmentShader: "
@@ -98,7 +98,7 @@ Item {
hideSource: rootItem.visible
sourceRect: transparentBorder ? Qt.rect(-64, -64, shaderItem.width, shaderItem.height) : Qt.rect(0, 0, 0, 0)
visible: false
- smooth: rootItem.blur > 0
+ smooth: rootItem.radius > 0
}
ShaderEffect {
@@ -232,7 +232,7 @@ Item {
property variant source4: level4
property variant source5: level5
property variant source6: level6
- property real lod: Math.sqrt(rootItem.blur) * 1.2 - 0.2
+ property real lod: Math.sqrt(rootItem.radius / 64.0) * 1.2 - 0.2
property real weight1
property real weight2
property real weight3
diff --git a/tests/auto/tst_qtgraphicaleffects.cpp b/tests/auto/tst_qtgraphicaleffects.cpp
index d26bf94..876bba0 100644
--- a/tests/auto/tst_qtgraphicaleffects.cpp
+++ b/tests/auto/tst_qtgraphicaleffects.cpp
@@ -149,7 +149,7 @@ void tst_qtgraphicaleffects::fastBlur()
QVERIFY(obj != 0);
// Default values
- QCOMPARE(obj->property("blur").toDouble(), 0.0);
+ QCOMPARE(obj->property("radius").toDouble(), 0.0);
QCOMPARE(obj->property("transparentBorder").toBool(), false);
QCOMPARE(obj->property("source").toInt(), 0);
QCOMPARE(obj->property("cached").toBool(), false);
diff --git a/tests/manual/testbed/TestFastBlur.qml b/tests/manual/testbed/TestFastBlur.qml
index ea723a2..7b377b3 100644
--- a/tests/manual/testbed/TestFastBlur.qml
+++ b/tests/manual/testbed/TestFastBlur.qml
@@ -49,7 +49,7 @@ TestCaseTemplate {
FastBlur {
id: effect
anchors.fill: imageSource
- blur: blurSlider.value
+ radius: blurSlider.value
transparentBorder: transparentBorderCheckBox.selected
visible: enabledCheckBox.selected
cached: cachedCheckBox.selected
@@ -63,9 +63,9 @@ TestCaseTemplate {
Slider {
id: blurSlider
minimum: 0.0
- maximum: 1.0
- value: 0.5
- caption: "blur"
+ maximum: 64.0
+ value: 32
+ caption: "radius"
}
CheckBox {
id: transparentBorderCheckBox
diff --git a/tools/pngdumper/ItemModel.qml b/tools/pngdumper/ItemModel.qml
index b755723..a962bf5 100644
--- a/tools/pngdumper/ItemModel.qml
+++ b/tools/pngdumper/ItemModel.qml
@@ -306,18 +306,18 @@ VisualItemModel {
height: size
source: bug
property string __name: "FastBlur"
- property variant __properties: ["blur"]
- property string __varyingProperty: "blur"
- property variant __values: ["0.0", "0.5", "1.0"]
+ property variant __properties: ["radius"]
+ property string __varyingProperty: "radius"
+ property variant __values: ["0.0", "32", "64"]
}
FastBlur {
function init() { checkerboard = true }
width: size
height: size
source: bug
- blur: 1.0
+ radius: 64
property string __name: "FastBlur"
- property variant __properties: ["blur", "transparentBorder"]
+ property variant __properties: ["radius", "transparentBorder"]
property string __varyingProperty: "transparentBorder"
property variant __values: [false, true]
function uninit() { checkerboard = false }