diff options
Diffstat (limited to 'doc')
21 files changed, 73 insertions, 71 deletions
diff --git a/doc/src/snippets/Blend-example.qml b/doc/src/snippets/Blend-example.qml index 2b830ab..ca33890 100644 --- a/doc/src/snippets/Blend-example.qml +++ b/doc/src/snippets/Blend-example.qml @@ -49,7 +49,7 @@ Item { height: 300 Image { - id: blendSourceItem1 + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -57,7 +57,7 @@ Item { } Image { - id: blendSourceItem2 + id: butterfly source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -65,9 +65,9 @@ Item { } Blend { - anchors.fill: blendSourceItem1 - backgroundSource: blendSourceItem1 - foregroundSource: blendSourceItem2 + anchors.fill: bug + backgroundSource: bug + foregroundSource: butterfly mode: "subtract" } } diff --git a/doc/src/snippets/BrightnessContrast-example.qml b/doc/src/snippets/BrightnessContrast-example.qml index fba744f..a439194 100644 --- a/doc/src/snippets/BrightnessContrast-example.qml +++ b/doc/src/snippets/BrightnessContrast-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: brightnessContrastSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } BrightnessContrast { - anchors.fill: brightnessContrastSourceItem - source: brightnessContrastSourceItem + anchors.fill: bug + source: bug brightness: -0.2 contrast: 0.3 } diff --git a/doc/src/snippets/ColorOverlay-example.qml b/doc/src/snippets/ColorOverlay-example.qml index a32572e..5cb223f 100644 --- a/doc/src/snippets/ColorOverlay-example.qml +++ b/doc/src/snippets/ColorOverlay-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: colorOverlaySourceItem + id: bug source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } ColorOverlay { - anchors.fill: colorOverlaySourceItem - source: colorOverlaySourceItem + anchors.fill: bug + source: bug color: "#80800000" } } diff --git a/doc/src/snippets/Colorize-example.qml b/doc/src/snippets/Colorize-example.qml index d9b19d0..1b1191a 100644 --- a/doc/src/snippets/Colorize-example.qml +++ b/doc/src/snippets/Colorize-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: colorizeSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } Colorize { - anchors.fill: colorizeSourceItem - source: colorizeSourceItem + anchors.fill: bug + source: bug hue: 0.5 saturation: 0.5 lightness: -0.2 diff --git a/doc/src/snippets/Desaturate-example.qml b/doc/src/snippets/Desaturate-example.qml index 884e48b..3878fbf 100644 --- a/doc/src/snippets/Desaturate-example.qml +++ b/doc/src/snippets/Desaturate-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: desaturateSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } Desaturate { - anchors.fill: desaturateSourceItem - source: desaturateSourceItem + anchors.fill: bug + source: bug desaturation: 0.8 } } diff --git a/doc/src/snippets/DirectionalBlur-example.qml b/doc/src/snippets/DirectionalBlur-example.qml index 84e1b21..b8a494f 100644 --- a/doc/src/snippets/DirectionalBlur-example.qml +++ b/doc/src/snippets/DirectionalBlur-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: directionalBlurSourceItem + id: butterfly source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } DirectionalBlur { - anchors.fill: directionalBlurSourceItem - source: directionalBlurSourceItem + anchors.fill: butterfly + source: butterfly angle: 90 length: 32 samples: 32 diff --git a/doc/src/snippets/Displace-example.qml b/doc/src/snippets/Displace-example.qml index cde1394..989fd67 100644 --- a/doc/src/snippets/Displace-example.qml +++ b/doc/src/snippets/Displace-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: displacementSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,9 +55,10 @@ Item { } Rectangle { - id: displacementMapItem + id: displacement color: Qt.rgba(0.5, 0.5, 1.0, 1.0) anchors.fill: parent + visible: false Image { anchors.centerIn: parent source: "images/displacementmap.png" @@ -67,9 +68,9 @@ Item { } Displace { - anchors.fill: displacementSourceItem - source: displacementSourceItem - displacementSource: ShaderEffectSource { hideSource: true; smooth: true; sourceItem: displacementMapItem; visible: false } + anchors.fill: bug + source: bug + displacementSource: displacement displacement: 0.1 } } diff --git a/doc/src/snippets/DropShadow-example.qml b/doc/src/snippets/DropShadow-example.qml index 18e4c76..e0e366a 100644 --- a/doc/src/snippets/DropShadow-example.qml +++ b/doc/src/snippets/DropShadow-example.qml @@ -51,17 +51,17 @@ Item { } DropShadow { - anchors.fill: dropShadowSourceItem + anchors.fill: butterfly horizontalOffset: 3 verticalOffset: 3 radius: 8.0 maximumRadius: 8.0 color: "#80000000" - source: dropShadowSourceItem + source: butterfly } Image { - id: dropShadowSourceItem + id: butterfly source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true diff --git a/doc/src/snippets/FastBlur-example.qml b/doc/src/snippets/FastBlur-example.qml index e154d4d..ae7b022 100644 --- a/doc/src/snippets/FastBlur-example.qml +++ b/doc/src/snippets/FastBlur-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: fastBlurSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } FastBlur { - anchors.fill: fastBlurSourceItem - source: fastBlurSourceItem + anchors.fill: bug + source: bug blur: 0.5 } } diff --git a/doc/src/snippets/GammaAdjust-example.qml b/doc/src/snippets/GammaAdjust-example.qml index 9784646..0331f28 100644 --- a/doc/src/snippets/GammaAdjust-example.qml +++ b/doc/src/snippets/GammaAdjust-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: gammaAdjustSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } GammaAdjust { - anchors.fill: gammaAdjustSourceItem - source: gammaAdjustSourceItem + anchors.fill: bug + source: bug gamma: 0.45 } } diff --git a/doc/src/snippets/GaussianBlur-example.qml b/doc/src/snippets/GaussianBlur-example.qml index 15954fd..0bd750c 100644 --- a/doc/src/snippets/GaussianBlur-example.qml +++ b/doc/src/snippets/GaussianBlur-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: gaussianBlurSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } GaussianBlur { - anchors.fill: gaussianBlurSourceItem - source: gaussianBlurSourceItem + anchors.fill: bug + source: bug radius: 8 maximumRadius: 8 } diff --git a/doc/src/snippets/Glow-example.qml b/doc/src/snippets/Glow-example.qml index a6572d7..33bfb0a 100644 --- a/doc/src/snippets/Glow-example.qml +++ b/doc/src/snippets/Glow-example.qml @@ -52,15 +52,15 @@ Item { } Glow { - anchors.fill: glowSourceItem + anchors.fill: butterfly radius: 8 maximumRadius: 8 color: "white" - source: glowSourceItem + source: butterfly } Image { - id: glowSourceItem + id: butterfly source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true diff --git a/doc/src/snippets/HueSaturation-example.qml b/doc/src/snippets/HueSaturation-example.qml index da83b78..29ad075 100644 --- a/doc/src/snippets/HueSaturation-example.qml +++ b/doc/src/snippets/HueSaturation-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: hueSaturationSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } HueSaturation { - anchors.fill: hueSaturationSourceItem - source: hueSaturationSourceItem + anchors.fill: bug + source: bug hue: -0.3 saturation: 0.5 lightness: -0.1 diff --git a/doc/src/snippets/InnerShadow-example.qml b/doc/src/snippets/InnerShadow-example.qml index fad9eff..85c652e 100644 --- a/doc/src/snippets/InnerShadow-example.qml +++ b/doc/src/snippets/InnerShadow-example.qml @@ -51,7 +51,7 @@ Item { } Image { - id: innerShadowSourceItem + id: butterfly source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -59,11 +59,11 @@ Item { } InnerShadow { - anchors.fill: innerShadowSourceItem + anchors.fill: butterfly radius: 16.0 maximumRadius: 16.0 color: "black" - source: innerShadowSourceItem + source: butterfly } } diff --git a/doc/src/snippets/LevelAdjust-example.qml b/doc/src/snippets/LevelAdjust-example.qml index 0580745..ec769ad 100644 --- a/doc/src/snippets/LevelAdjust-example.qml +++ b/doc/src/snippets/LevelAdjust-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: levelAdjustSourceItem + id: butterfly source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } LevelAdjust { - anchors.fill: levelAdjustSourceItem - source: levelAdjustSourceItem + anchors.fill: butterfly + source: butterfly minimumOutput: "#00000000" maximumOutput: "#FF1010FF" } diff --git a/doc/src/snippets/OpacityMask-example.qml b/doc/src/snippets/OpacityMask-example.qml index 6c8a69f..bc3320e 100644 --- a/doc/src/snippets/OpacityMask-example.qml +++ b/doc/src/snippets/OpacityMask-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: opacityMaskSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,10 +55,11 @@ Item { } Image { - id: opacityMaskItem + id: mask source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true + visible: false Text { text: "MASK" font.pixelSize: 60 @@ -71,9 +72,9 @@ Item { } OpacityMask { - anchors.fill: opacityMaskSourceItem - source: opacityMaskSourceItem - maskSource: ShaderEffectSource { hideSource: true; smooth: true; sourceItem: opacityMaskItem; visible: false } + anchors.fill: bug + source: bug + maskSource: mask } } //! [example] diff --git a/doc/src/snippets/RadialBlur-example.qml b/doc/src/snippets/RadialBlur-example.qml index d13b5b9..3562390 100644 --- a/doc/src/snippets/RadialBlur-example.qml +++ b/doc/src/snippets/RadialBlur-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: radialBlurSourceItem + id: butterfly source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } RadialBlur { - anchors.fill: radialBlurSourceItem - source: radialBlurSourceItem + anchors.fill: butterfly + source: butterfly samples: 32 angle: 30 } diff --git a/doc/src/snippets/RectangularGlow-example.qml b/doc/src/snippets/RectangularGlow-example.qml index 2daeff2..3ba9e4b 100644 --- a/doc/src/snippets/RectangularGlow-example.qml +++ b/doc/src/snippets/RectangularGlow-example.qml @@ -53,15 +53,15 @@ Item { RectangularGlow { id: effect - anchors.fill: rectangularGlowSource + anchors.fill: rect glowRadius: 10 spread: 0.2 color: "white" - cornerRadius: rectangularGlowSource.radius + glowRadius + cornerRadius: rect.radius + glowRadius } Rectangle { - id: rectangularGlowSource + id: rect color: "#cc4b00" anchors.centerIn: parent width: Math.round(parent.width / 1.5) diff --git a/doc/src/snippets/RecursiveBlur-example.qml b/doc/src/snippets/RecursiveBlur-example.qml index f667c1b..ebafb90 100644 --- a/doc/src/snippets/RecursiveBlur-example.qml +++ b/doc/src/snippets/RecursiveBlur-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: recursiveBlurSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } RecursiveBlur { - anchors.fill: recursiveBlurSourceItem - source: recursiveBlurSourceItem + anchors.fill: bug + source: bug radius: 7.5 loops: 50 } diff --git a/doc/src/snippets/ThresholdMask-example.qml b/doc/src/snippets/ThresholdMask-example.qml index 2407218..a4d8577 100644 --- a/doc/src/snippets/ThresholdMask-example.qml +++ b/doc/src/snippets/ThresholdMask-example.qml @@ -53,7 +53,7 @@ Item { } Image { - id: thresholdMaskSourceItem + id: bug source: "images/bug.jpg" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -61,7 +61,7 @@ Item { } Image { - id: thresholdMaskItem + id: mask source: "images/fog.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -69,9 +69,9 @@ Item { } ThresholdMask { - anchors.fill: thresholdMaskSourceItem - source: thresholdMaskSourceItem - maskSource: thresholdMaskItem + anchors.fill: bug + source: bug + maskSource: mask threshold: 0.4 spread: 0.2 } diff --git a/doc/src/snippets/ZoomBlur-example.qml b/doc/src/snippets/ZoomBlur-example.qml index 70783e5..7f3daf0 100644 --- a/doc/src/snippets/ZoomBlur-example.qml +++ b/doc/src/snippets/ZoomBlur-example.qml @@ -47,7 +47,7 @@ Item { height: 300 Image { - id: zoomBlurSourceItem + id: butterfly source: "images/butterfly.png" sourceSize: Qt.size(parent.width, parent.height) smooth: true @@ -55,8 +55,8 @@ Item { } ZoomBlur { - anchors.fill: zoomBlurSourceItem - source: zoomBlurSourceItem + anchors.fill: butterfly + source: butterfly samples: 32 length: 48 } |