summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml')
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml11
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml
index 5e8c9e0ef..76535ea7e 100644
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml
+++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml
@@ -46,6 +46,13 @@ Effect {
name: "Diffraction"
value: 0.5
}
+ onDataChanged: updateParameters()
+ }
+
+ function updateParameters()
+ {
+ radius = parameters.get(0).value * 100;
+ diffractionIndex = parameters.get(1).value;
}
property real posX: -1
@@ -59,8 +66,8 @@ Effect {
}
// Transform slider values, and bind result to shader uniforms
- property real radius: parameters.get(0).value * 100
- property real diffractionIndex: parameters.get(1).value
+ property real radius: 0.5 * 100
+ property real diffractionIndex: 0.5
onTargetWidthChanged: {
if (posX == -1)