aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaj Grönholm <kaj.gronholm@qt.io>2023-01-26 09:51:22 +0200
committerKaj Grönholm <kaj.gronholm@qt.io>2023-01-26 12:42:33 +0200
commit396a7454e63809935bd92d1fa35c8af4accaff10 (patch)
treef79741e0e06f9ef213b42e58b4a33766cdc7f33a
parent5e7ab15f12b3b8545dd5921f7cecdfd074dce4d0 (diff)
Adjust the MultiEffect API
Based on the API review, adjust the MultiEffect API. - Change mask threshold Low/Up to Min/Max and for spread AtMin/AtMax. - Change colorize to colorization so it is more symmetric with brightness, saturation etc. Task-number: QTBUG-109557 Pick-to: 6.5 Change-Id: I96ff2a13e20405998c5ed0cb38ad3b5911daf94c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffect3DFlip.qml16
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlinds.qml8
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffectHeart.qml12
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffectStars.qml12
-rw-r--r--examples/quick/multieffect/itemswitcher/qml/SwitchEffectThunder.qml20
-rw-r--r--examples/quick/multieffect/testbed/qml/Settings.qml28
-rw-r--r--examples/quick/multieffect/testbed/qml/SettingsView.qml46
-rw-r--r--examples/quick/multieffect/testbed/qml/main.qml12
-rw-r--r--src/effects/data/shaders/bluritems.frag.qsbbin1730 -> 1738 bytes
-rw-r--r--src/effects/data/shaders/bluritems.vert.qsbbin2389 -> 2395 bytes
-rw-r--r--src/effects/data/shaders/multieffect.frag6
-rw-r--r--src/effects/data/shaders/multieffect.vert2
-rw-r--r--src/effects/data/shaders/multieffect_c.vert.qsbbin2427 -> 2439 bytes
-rw-r--r--src/effects/data/shaders/multieffect_c0.frag.qsbbin3037 -> 2862 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cb1.frag.qsbbin3530 -> 3345 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cb2.frag.qsbbin3676 -> 3492 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cb3.frag.qsbbin3795 -> 3612 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cbs1.frag.qsbbin4232 -> 4004 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cbs2.frag.qsbbin4452 -> 4206 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cbs3.frag.qsbbin4637 -> 4399 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cm0.frag.qsbbin3568 -> 3365 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cmb1.frag.qsbbin4032 -> 3838 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cmb2.frag.qsbbin4193 -> 3994 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cmb3.frag.qsbbin4319 -> 4138 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cmbs1.frag.qsbbin4741 -> 4511 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cmbs2.frag.qsbbin4956 -> 4727 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cmbs3.frag.qsbbin5148 -> 4884 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cms0.frag.qsbbin4001 -> 3752 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cms1.frag.qsbbin4513 -> 4235 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cms2.frag.qsbbin4655 -> 4432 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cms3.frag.qsbbin4803 -> 4560 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cs.vert.qsbbin2669 -> 2680 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cs0.frag.qsbbin3479 -> 3230 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cs1.frag.qsbbin4006 -> 3771 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cs2.frag.qsbbin4163 -> 3927 bytes
-rw-r--r--src/effects/data/shaders/multieffect_cs3.frag.qsbbin4291 -> 4031 bytes
-rw-r--r--src/effects/qquickmultieffect.cpp170
-rw-r--r--src/effects/qquickmultieffect_p.h48
-rw-r--r--src/effects/qquickmultieffect_p_p.h38
39 files changed, 209 insertions, 209 deletions
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffect3DFlip.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffect3DFlip.qml
index a5a18b0b8d..bb33b8c6b6 100644
--- a/examples/quick/multieffect/itemswitcher/qml/SwitchEffect3DFlip.qml
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffect3DFlip.qml
@@ -29,10 +29,10 @@ Item {
source: "images/smoke.png"
visible: false
}
- maskThresholdLow: switcher.inAnimation * 0.6
- maskSpreadLow: 0.1
- maskThresholdUp: 1.0 - (switcher.inAnimation * 0.6)
- maskSpreadUp: 0.1
+ maskThresholdMin: switcher.inAnimation * 0.6
+ maskSpreadAtMin: 0.1
+ maskThresholdMax: 1.0 - (switcher.inAnimation * 0.6)
+ maskSpreadAtMax: 0.1
shadowEnabled: true
shadowOpacity: 0.5
@@ -69,10 +69,10 @@ Item {
source: "images/smoke.png"
visible: false
}
- maskThresholdLow: switcher.outAnimation * 0.6
- maskSpreadLow: 0.1
- maskThresholdUp: 1.0 - (switcher.outAnimation * 0.6)
- maskSpreadUp: 0.1
+ maskThresholdMin: switcher.outAnimation * 0.6
+ maskSpreadAtMin: 0.1
+ maskThresholdMax: 1.0 - (switcher.outAnimation * 0.6)
+ maskSpreadAtMax: 0.1
shadowEnabled: true
shadowOpacity: 0.5
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlinds.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlinds.qml
index 3a9f22e3ad..8849631be9 100644
--- a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlinds.qml
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectBlinds.qml
@@ -34,8 +34,8 @@ Item {
anchors.fill: parent
maskEnabled: true
maskSource: mask
- maskThresholdLow: switcher.inAnimation
- maskSpreadLow: 0.4
+ maskThresholdMin: switcher.inAnimation
+ maskSpreadAtMin: 0.4
}
// Item coming in
MultiEffect {
@@ -43,7 +43,7 @@ Item {
anchors.fill: parent
maskEnabled: true
maskSource: mask
- maskThresholdUp: switcher.inAnimation
- maskSpreadUp: 0.4
+ maskThresholdMax: switcher.inAnimation
+ maskSpreadAtMax: 0.4
}
}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectHeart.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectHeart.qml
index e81c648e2c..e80c54460c 100644
--- a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectHeart.qml
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectHeart.qml
@@ -31,8 +31,8 @@ Item {
maskEnabled: true
maskSource: mask
maskInverted: true
- maskThresholdLow: 0.5
- maskSpreadLow: 0.0
+ maskThresholdMin: 0.5
+ maskSpreadAtMin: 0.0
}
// Item coming in
MultiEffect {
@@ -40,9 +40,9 @@ Item {
anchors.fill: parent
maskEnabled: true
maskSource: mask
- maskThresholdLow: 0.5
- maskSpreadLow: 0.0
- colorizeColor: "red"
- colorize: Math.max(0, 1.0 - switcher.inAnimation * 2)
+ maskThresholdMin: 0.5
+ maskSpreadAtMin: 0.0
+ colorizationColor: "red"
+ colorization: Math.max(0, 1.0 - switcher.inAnimation * 2)
}
}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectStars.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectStars.qml
index 47bdf3f64d..c533572e66 100644
--- a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectStars.qml
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectStars.qml
@@ -32,8 +32,8 @@ Item {
maskEnabled: true
maskSource: mask
maskInverted: true
- maskThresholdLow: 0.5
- maskSpreadLow: 0.5
+ maskThresholdMin: 0.5
+ maskSpreadAtMin: 0.5
}
// Item coming in
MultiEffect {
@@ -41,10 +41,10 @@ Item {
anchors.fill: parent
maskEnabled: true
maskSource: mask
- maskThresholdLow: 0.5
- maskSpreadLow: 0.5
- colorizeColor: "#ffd020"
- colorize: Math.max(0, 1.0 - switcher.inAnimation * 2)
+ maskThresholdMin: 0.5
+ maskSpreadAtMin: 0.5
+ colorizationColor: "#ffd020"
+ colorization: Math.max(0, 1.0 - switcher.inAnimation * 2)
brightness: Math.max(0.0, 0.8 - switcher.inAnimation * 2)
}
}
diff --git a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectThunder.qml b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectThunder.qml
index ba26675dd7..80a6e9bf8f 100644
--- a/examples/quick/multieffect/itemswitcher/qml/SwitchEffectThunder.qml
+++ b/examples/quick/multieffect/itemswitcher/qml/SwitchEffectThunder.qml
@@ -31,17 +31,17 @@ Item {
blurMax: 32
blurMultiplier: 0.5
opacity: switcher.outAnimation
- colorizeColor: "#f0d060"
- colorize: switcher.inAnimation
+ colorizationColor: "#f0d060"
+ colorization: switcher.inAnimation
contrast: switcher.inAnimation
brightness: switcher.inAnimation
maskEnabled: true
maskSource: maskImage
- maskThresholdLow: switcher.inAnimation * 0.9
- maskSpreadLow: 0.2
- maskThresholdUp: 1.0
+ maskThresholdMin: switcher.inAnimation * 0.9
+ maskSpreadAtMin: 0.2
+ maskThresholdMax: 1.0
shadowEnabled: true
shadowColor: "#f04000"
@@ -64,16 +64,16 @@ Item {
blurMultiplier: 0.5
opacity: switcher.inAnimation * 3.0 - 1.0
- colorizeColor: "#f0d060"
- colorize: switcher.outAnimation
+ colorizationColor: "#f0d060"
+ colorization: switcher.outAnimation
contrast: switcher.outAnimation
brightness: switcher.outAnimation
maskEnabled: true
maskSource: maskImage
- maskThresholdLow: switcher.outAnimation * 0.6
- maskSpreadLow: 0.2
- maskThresholdUp: 1.0
+ maskThresholdMin: switcher.outAnimation * 0.6
+ maskSpreadAtMin: 0.2
+ maskThresholdMax: 1.0
shadowEnabled: true
shadowColor: "#f04000"
diff --git a/examples/quick/multieffect/testbed/qml/Settings.qml b/examples/quick/multieffect/testbed/qml/Settings.qml
index 82db53202c..6139bdc6f4 100644
--- a/examples/quick/multieffect/testbed/qml/Settings.qml
+++ b/examples/quick/multieffect/testbed/qml/Settings.qml
@@ -28,9 +28,9 @@ QtObject {
property real contrast: 0.0
property bool saturationEnabled: true
property real saturation: 0.0
- property bool colorizeEnabled: true
- property color colorizeColor: Qt.rgba(1.0, 0.0, 0.0, 1.0)
- property real colorize: 0.0
+ property bool colorizationEnabled: true
+ property color colorizationColor: Qt.rgba(1.0, 0.0, 0.0, 1.0)
+ property real colorization: 0.0
property bool blurEnabled: true
property real blur: 0.0
@@ -47,10 +47,10 @@ QtObject {
property bool maskEnabled: true
property bool maskInverted: false
- property real maskThresholdLow: 0.0
- property real maskSpreadLow: 0.0
- property real maskThresholdUp: 1.0
- property real maskSpreadUp: 0.0
+ property real maskThresholdMin: 0.0
+ property real maskSpreadAtMin: 0.0
+ property real maskThresholdMax: 1.0
+ property real maskSpreadAtMax: 0.0
function reset() {
autoPaddingEnabled = defaultSettings.autoPaddingEnabled;
@@ -62,9 +62,9 @@ QtObject {
contrast = defaultSettings.contrast;
saturationEnabled = defaultSettings.saturationEnabled;
saturation = defaultSettings.saturation;
- colorizeEnabled = defaultSettings.colorizeEnabled;
- colorizeColor = defaultSettings.colorizeColor;
- colorize = defaultSettings.colorize;
+ colorizationEnabled = defaultSettings.colorizationEnabled;
+ colorizationColor = defaultSettings.colorizationColor;
+ colorization = defaultSettings.colorization;
blurEnabled = defaultSettings.blurEnabled;
blur = defaultSettings.blur;
@@ -81,10 +81,10 @@ QtObject {
maskEnabled = defaultSettings.maskEnabled;
maskInverted = defaultSettings.maskInverted;
- maskThresholdLow = defaultSettings.maskThresholdLow;
- maskSpreadLow = defaultSettings.maskSpreadLow;
- maskThresholdUp = defaultSettings.maskThresholdUp;
- maskSpreadUp = defaultSettings.maskSpreadUp;
+ maskThresholdMin = defaultSettings.maskThresholdMin;
+ maskSpreadAtMin = defaultSettings.maskSpreadAtMin;
+ maskThresholdMax = defaultSettings.maskThresholdMax;
+ maskSpreadAtMax = defaultSettings.maskSpreadAtMax;
rootItem.reseted();
}
diff --git a/examples/quick/multieffect/testbed/qml/SettingsView.qml b/examples/quick/multieffect/testbed/qml/SettingsView.qml
index d0d70958bf..9b753298dd 100644
--- a/examples/quick/multieffect/testbed/qml/SettingsView.qml
+++ b/examples/quick/multieffect/testbed/qml/SettingsView.qml
@@ -11,9 +11,9 @@ Item {
property real showAnimation: show ? 1 : 0
function resetSettings() {
- colorizeColorSelector.setValues(defaultSettings.colorizeColor.r,
- defaultSettings.colorizeColor.g,
- defaultSettings.colorizeColor.b);
+ colorizationColorSelector.setValues(defaultSettings.colorizationColor.r,
+ defaultSettings.colorizationColor.g,
+ defaultSettings.colorizationColor.b);
shadowColorSelector.setValues(defaultSettings.shadowColor.r,
defaultSettings.shadowColor.g,
defaultSettings.shadowColor.b);
@@ -213,25 +213,25 @@ Item {
}
}
SettingsComponentSlider {
- text: qsTr("Colorize") + ": " + value.toFixed(3)
+ text: qsTr("Colorization") + ": " + value.toFixed(3)
showCheckbox: true
- checked: settings.colorizeEnabled
+ checked: settings.colorizationEnabled
onToggled: {
- settings.colorizeEnabled = checked;
+ settings.colorizationEnabled = checked;
}
- value: settings.colorize
+ value: settings.colorization
from: 0
to: 1
onMoved: {
- settings.colorize = value;
+ settings.colorization = value;
}
}
SettingsComponentColorSelector {
- id: colorizeColorSelector
- text: qsTr("Colorize Color")
+ id: colorizationColorSelector
+ text: qsTr("Colorization Color")
width: settings.settingsViewWidth - 10
onValueChanged: {
- settings.colorizeColor = value;
+ settings.colorizationColor = value;
}
}
}
@@ -359,39 +359,39 @@ Item {
height: 20 * dp
}
SettingsComponentSlider {
- text: qsTr("Mask Lower Threshold") + ": " + value.toFixed(3)
- value: settings.maskThresholdLow
+ text: qsTr("Mask Threshold Min") + ": " + value.toFixed(3)
+ value: settings.maskThresholdMin
from: 0.0
to: 1.0
onMoved: {
- settings.maskThresholdLow = value;
+ settings.maskThresholdMin = value;
}
}
SettingsComponentSlider {
- text: qsTr("Mask Lower Spread") + ": " + value.toFixed(3)
- value: settings.maskSpreadLow
+ text: qsTr("Mask Spread At Min") + ": " + value.toFixed(3)
+ value: settings.maskSpreadAtMin
from: 0.0
to: 1.0
onMoved: {
- settings.maskSpreadLow = value;
+ settings.maskSpreadAtMin = value;
}
}
SettingsComponentSlider {
- text: qsTr("Mask Upper Threshold") + ": " + value.toFixed(3)
- value: settings.maskThresholdUp
+ text: qsTr("Mask Threshold Max") + ": " + value.toFixed(3)
+ value: settings.maskThresholdMax
from: 0.0
to: 1.0
onMoved: {
- settings.maskThresholdUp = value;
+ settings.maskThresholdMax = value;
}
}
SettingsComponentSlider {
- text: qsTr("Mask Upper Spread") + ": " + value.toFixed(3)
- value: settings.maskSpreadUp
+ text: qsTr("Mask Spread At Max") + ": " + value.toFixed(3)
+ value: settings.maskSpreadAtMax
from: 0.0
to: 1.0
onMoved: {
- settings.maskSpreadUp = value;
+ settings.maskSpreadAtMax = value;
}
}
}
diff --git a/examples/quick/multieffect/testbed/qml/main.qml b/examples/quick/multieffect/testbed/qml/main.qml
index 71cec0a486..6d34a47bfa 100644
--- a/examples/quick/multieffect/testbed/qml/main.qml
+++ b/examples/quick/multieffect/testbed/qml/main.qml
@@ -85,8 +85,8 @@ Rectangle {
brightness: settings.brightnessEnabled ? settings.brightness : 0
contrast: settings.contrastEnabled ? settings.contrast : 0
saturation: settings.saturationEnabled ? settings.saturation : 0
- colorizeColor: settings.colorizeColor
- colorize: settings.colorizeEnabled ? settings.colorize : 0
+ colorizationColor: settings.colorizationColor
+ colorization: settings.colorizationEnabled ? settings.colorization : 0
blurEnabled: settings.blurEnabled
blur: settings.blur
blurMax: settings.blurMax
@@ -100,10 +100,10 @@ Rectangle {
shadowScale: settings.shadowScale
maskEnabled: settings.maskEnabled
maskInverted: settings.maskInverted
- maskThresholdLow: settings.maskThresholdLow
- maskSpreadLow: settings.maskSpreadLow
- maskThresholdUp: settings.maskThresholdUp
- maskSpreadUp: settings.maskSpreadUp
+ maskThresholdMin: settings.maskThresholdMin
+ maskSpreadAtMin: settings.maskSpreadAtMin
+ maskThresholdMax: settings.maskThresholdMax
+ maskSpreadAtMax: settings.maskSpreadAtMax
onItemSizeChanged: {
warningsView.showSizeWarning();
diff --git a/src/effects/data/shaders/bluritems.frag.qsb b/src/effects/data/shaders/bluritems.frag.qsb
index 529c855f78..61e85d0daa 100644
--- a/src/effects/data/shaders/bluritems.frag.qsb
+++ b/src/effects/data/shaders/bluritems.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/bluritems.vert.qsb b/src/effects/data/shaders/bluritems.vert.qsb
index 32c1e7d065..97020e2f27 100644
--- a/src/effects/data/shaders/bluritems.vert.qsb
+++ b/src/effects/data/shaders/bluritems.vert.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect.frag b/src/effects/data/shaders/multieffect.frag
index 975ac05250..972e87fd41 100644
--- a/src/effects/data/shaders/multieffect.frag
+++ b/src/effects/data/shaders/multieffect.frag
@@ -17,7 +17,7 @@ layout(std140, binding = 0) uniform buf {
float contrast;
float brightness;
float saturation;
- vec4 colorizeColor;
+ vec4 colorizationColor;
vec4 blurWeight1;
vec2 blurWeight2;
vec4 mask;
@@ -74,11 +74,11 @@ void main() {
#endif
#endif // BLUR
- // contrast, brightness, saturation and colorize
+ // contrast, brightness, saturation and colorization
color.rgb = (color.rgb - 0.5 * color.a) * (1.0 + contrast) + 0.5 * color.a;
color.rgb += brightness * color.a;
float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
- color.rgb = gray * colorizeColor.rgb * colorizeColor.a + color.rgb * (1.0 - colorizeColor.a);
+ color.rgb = gray * colorizationColor.rgb * colorizationColor.a + color.rgb * (1.0 - colorizationColor.a);
color.rgb = mix(vec3(gray), color.rgb, 1.0 + saturation);
#if defined(SHADOW)
diff --git a/src/effects/data/shaders/multieffect.vert b/src/effects/data/shaders/multieffect.vert
index ceca1039be..f970c75697 100644
--- a/src/effects/data/shaders/multieffect.vert
+++ b/src/effects/data/shaders/multieffect.vert
@@ -18,7 +18,7 @@ layout(std140, binding = 0) uniform buf {
float contrast;
float brightness;
float saturation;
- vec4 colorizeColor;
+ vec4 colorizationColor;
vec4 blurWeight1;
vec2 blurWeight2;
vec4 mask;
diff --git a/src/effects/data/shaders/multieffect_c.vert.qsb b/src/effects/data/shaders/multieffect_c.vert.qsb
index b71a90ac39..e95790de4d 100644
--- a/src/effects/data/shaders/multieffect_c.vert.qsb
+++ b/src/effects/data/shaders/multieffect_c.vert.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_c0.frag.qsb b/src/effects/data/shaders/multieffect_c0.frag.qsb
index aa114c4444..d57768566d 100644
--- a/src/effects/data/shaders/multieffect_c0.frag.qsb
+++ b/src/effects/data/shaders/multieffect_c0.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cb1.frag.qsb b/src/effects/data/shaders/multieffect_cb1.frag.qsb
index fcb8a4551e..5765ff7fa8 100644
--- a/src/effects/data/shaders/multieffect_cb1.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cb1.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cb2.frag.qsb b/src/effects/data/shaders/multieffect_cb2.frag.qsb
index 20d2d12d47..8e5d1da445 100644
--- a/src/effects/data/shaders/multieffect_cb2.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cb2.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cb3.frag.qsb b/src/effects/data/shaders/multieffect_cb3.frag.qsb
index f40528c3b5..1dd589836f 100644
--- a/src/effects/data/shaders/multieffect_cb3.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cb3.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cbs1.frag.qsb b/src/effects/data/shaders/multieffect_cbs1.frag.qsb
index 7105b8b702..bbcee6cb9d 100644
--- a/src/effects/data/shaders/multieffect_cbs1.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cbs1.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cbs2.frag.qsb b/src/effects/data/shaders/multieffect_cbs2.frag.qsb
index 02aea79e23..db04f68296 100644
--- a/src/effects/data/shaders/multieffect_cbs2.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cbs2.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cbs3.frag.qsb b/src/effects/data/shaders/multieffect_cbs3.frag.qsb
index 7a85fca2ba..a32d6446f2 100644
--- a/src/effects/data/shaders/multieffect_cbs3.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cbs3.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cm0.frag.qsb b/src/effects/data/shaders/multieffect_cm0.frag.qsb
index 8a8356aec3..d29a83245a 100644
--- a/src/effects/data/shaders/multieffect_cm0.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cm0.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cmb1.frag.qsb b/src/effects/data/shaders/multieffect_cmb1.frag.qsb
index 28b9cd104e..8c439307e2 100644
--- a/src/effects/data/shaders/multieffect_cmb1.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cmb1.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cmb2.frag.qsb b/src/effects/data/shaders/multieffect_cmb2.frag.qsb
index f823166ac3..7f040f6b1a 100644
--- a/src/effects/data/shaders/multieffect_cmb2.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cmb2.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cmb3.frag.qsb b/src/effects/data/shaders/multieffect_cmb3.frag.qsb
index b520f6ae33..13700a6c0c 100644
--- a/src/effects/data/shaders/multieffect_cmb3.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cmb3.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cmbs1.frag.qsb b/src/effects/data/shaders/multieffect_cmbs1.frag.qsb
index bca56c0b3f..8f551a2fd4 100644
--- a/src/effects/data/shaders/multieffect_cmbs1.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cmbs1.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cmbs2.frag.qsb b/src/effects/data/shaders/multieffect_cmbs2.frag.qsb
index 7992395821..23496052da 100644
--- a/src/effects/data/shaders/multieffect_cmbs2.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cmbs2.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cmbs3.frag.qsb b/src/effects/data/shaders/multieffect_cmbs3.frag.qsb
index 9f07fb04e2..14beb5200f 100644
--- a/src/effects/data/shaders/multieffect_cmbs3.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cmbs3.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cms0.frag.qsb b/src/effects/data/shaders/multieffect_cms0.frag.qsb
index 2011cddcb6..c064df1dcf 100644
--- a/src/effects/data/shaders/multieffect_cms0.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cms0.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cms1.frag.qsb b/src/effects/data/shaders/multieffect_cms1.frag.qsb
index 661e04743d..b3f91d5f84 100644
--- a/src/effects/data/shaders/multieffect_cms1.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cms1.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cms2.frag.qsb b/src/effects/data/shaders/multieffect_cms2.frag.qsb
index fd09167c03..85b1d179b2 100644
--- a/src/effects/data/shaders/multieffect_cms2.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cms2.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cms3.frag.qsb b/src/effects/data/shaders/multieffect_cms3.frag.qsb
index 3fedfab7ba..440bb16fe0 100644
--- a/src/effects/data/shaders/multieffect_cms3.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cms3.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cs.vert.qsb b/src/effects/data/shaders/multieffect_cs.vert.qsb
index 33b4ea2c55..2e1cce7fde 100644
--- a/src/effects/data/shaders/multieffect_cs.vert.qsb
+++ b/src/effects/data/shaders/multieffect_cs.vert.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cs0.frag.qsb b/src/effects/data/shaders/multieffect_cs0.frag.qsb
index c3b41ccc47..994a9ac973 100644
--- a/src/effects/data/shaders/multieffect_cs0.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cs0.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cs1.frag.qsb b/src/effects/data/shaders/multieffect_cs1.frag.qsb
index 2be78c9239..d6a2071e32 100644
--- a/src/effects/data/shaders/multieffect_cs1.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cs1.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cs2.frag.qsb b/src/effects/data/shaders/multieffect_cs2.frag.qsb
index 76d1dbc0b3..3b8fb53f84 100644
--- a/src/effects/data/shaders/multieffect_cs2.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cs2.frag.qsb
Binary files differ
diff --git a/src/effects/data/shaders/multieffect_cs3.frag.qsb b/src/effects/data/shaders/multieffect_cs3.frag.qsb
index 67d85db901..872a993fdd 100644
--- a/src/effects/data/shaders/multieffect_cs3.frag.qsb
+++ b/src/effects/data/shaders/multieffect_cs3.frag.qsb
Binary files differ
diff --git a/src/effects/qquickmultieffect.cpp b/src/effects/qquickmultieffect.cpp
index d61ce5b737..78d7728ff6 100644
--- a/src/effects/qquickmultieffect.cpp
+++ b/src/effects/qquickmultieffect.cpp
@@ -33,7 +33,7 @@ Q_LOGGING_CATEGORY(lcQuickEffect, "qt.quick.effects")
The MultiEffect type applies a post-processing effect to \c source item.
Compared to \c {Qt Graphical Effects} module, MultiEffect combines multiple
- effects (blur, shadow, colorize etc.) into a single item and shader. This
+ effects (blur, shadow, colorization etc.) into a single item and shader. This
makes it optimal for multiple effects.
MultiEffect is designed especially for animated effects. There are several
@@ -192,44 +192,44 @@ void QQuickMultiEffect::setSaturation(qreal saturation)
}
/*!
- \qmlproperty real QtQuick::MultiEffect::colorize
+ \qmlproperty real QtQuick::MultiEffect::colorization
This property defines how much the source is colorized with the
- colorizeColor.
+ colorizationColor.
- The value ranges from 0.0 (no colorized) to 1.0 (fully colorized).
+ The value ranges from 0.0 (not colorized) to 1.0 (fully colorized).
By default, the property is set to \c 0.0 (no change).
*/
-qreal QQuickMultiEffect::colorize() const
+qreal QQuickMultiEffect::colorization() const
{
Q_D(const QQuickMultiEffect);
- return d->colorize();
+ return d->colorization();
}
-void QQuickMultiEffect::setColorize(qreal colorize)
+void QQuickMultiEffect::setColorization(qreal colorization)
{
Q_D(QQuickMultiEffect);
- d->setColorize(colorize);
+ d->setColorization(colorization);
}
/*!
- \qmlproperty color QtQuick::MultiEffect::colorizeColor
+ \qmlproperty color QtQuick::MultiEffect::colorizationColor
This property defines the RGBA color value which is used to
colorize the source.
By default, the property is set to \c Qt.rgba(1.0, 0.0, 0.0, 1.0) (red).
*/
-QColor QQuickMultiEffect::colorizeColor() const
+QColor QQuickMultiEffect::colorizationColor() const
{
Q_D(const QQuickMultiEffect);
- return d->colorizeColor();
+ return d->colorizationColor();
}
-void QQuickMultiEffect::setColorizeColor(const QColor &color)
+void QQuickMultiEffect::setColorizationColor(const QColor &color)
{
Q_D(QQuickMultiEffect);
- d->setColorizeColor(color);
+ d->setColorizationColor(color);
}
/*!
@@ -449,7 +449,7 @@ void QQuickMultiEffect::setShadowVerticalOffset(qreal offset)
/*!
\qmlproperty color QtQuick::MultiEffect::shadowColor
- This property defines the RGBA color value which is used to colorize
+ This property defines the RGBA color value which is used for
the shadow. It is useful for example when a shadow is used for
simulating a glow effect.
@@ -533,7 +533,7 @@ void QQuickMultiEffect::setMaskSource(QQuickItem *item)
}
/*!
- \qmlproperty real QtQuick::MultiEffect::maskThresholdLow
+ \qmlproperty real QtQuick::MultiEffect::maskThresholdMin
This property defines a lower threshold value for the mask pixels.
The mask pixels that have an alpha value below this property are used
@@ -544,43 +544,43 @@ void QQuickMultiEffect::setMaskSource(QQuickItem *item)
The value ranges from 0.0 (alpha value 0) to 1.0 (alpha value 255). By
default, the property is set to \c 0.0.
*/
-qreal QQuickMultiEffect::maskThresholdLow() const
+qreal QQuickMultiEffect::maskThresholdMin() const
{
Q_D(const QQuickMultiEffect);
- return d->maskThresholdLow();
+ return d->maskThresholdMin();
}
-void QQuickMultiEffect::setMaskThresholdLow(qreal threshold)
+void QQuickMultiEffect::setMaskThresholdMin(qreal threshold)
{
Q_D(QQuickMultiEffect);
- d->setMaskThresholdLow(threshold);
+ d->setMaskThresholdMin(threshold);
}
/*!
- \qmlproperty real QtQuick::MultiEffect::maskSpreadLow
+ \qmlproperty real QtQuick::MultiEffect::maskSpreadAtMin
This property defines the smoothness of the mask edges near the
- maskThresholdLow. Setting higher spread values softens the transition
+ maskThresholdMin. Setting higher spread values softens the transition
from the transparent mask pixels towards opaque mask pixels by adding
interpolated values between them.
The value ranges from 0.0 (sharp mask edge) to 1.0 (smooth mask edge).
By default, the property is set to \c 0.0.
*/
-qreal QQuickMultiEffect::maskSpreadLow() const
+qreal QQuickMultiEffect::maskSpreadAtMin() const
{
Q_D(const QQuickMultiEffect);
- return d->maskSpreadLow();
+ return d->maskSpreadAtMin();
}
-void QQuickMultiEffect::setMaskSpreadLow(qreal spread)
+void QQuickMultiEffect::setMaskSpreadAtMin(qreal spread)
{
Q_D(QQuickMultiEffect);
- d->setMaskSpreadLow(spread);
+ d->setMaskSpreadAtMin(spread);
}
/*!
- \qmlproperty real QtQuick::MultiEffect::maskThresholdUp
+ \qmlproperty real QtQuick::MultiEffect::maskThresholdMax
This property defines an upper threshold value for the mask pixels.
The mask pixels that have an alpha value below this property are used
@@ -591,46 +591,46 @@ void QQuickMultiEffect::setMaskSpreadLow(qreal spread)
The value ranges from 0.0 (alpha value 0) to 1.0 (alpha value 255). By
default, the property is set to \c 1.0.
*/
-qreal QQuickMultiEffect::maskThresholdUp() const
+qreal QQuickMultiEffect::maskThresholdMax() const
{
Q_D(const QQuickMultiEffect);
- return d->maskThresholdUp();
+ return d->maskThresholdMax();
}
-void QQuickMultiEffect::setMaskThresholdUp(qreal threshold)
+void QQuickMultiEffect::setMaskThresholdMax(qreal threshold)
{
Q_D(QQuickMultiEffect);
- d->setMaskThresholdUp(threshold);
+ d->setMaskThresholdMax(threshold);
}
/*!
- \qmlproperty real QtQuick::MultiEffect::maskSpreadUp
+ \qmlproperty real QtQuick::MultiEffect::maskSpreadAtMax
This property defines the smoothness of the mask edges near the
- maskThresholdUp. Using higher spread values softens the transition
+ maskThresholdMax. Using higher spread values softens the transition
from the transparent mask pixels towards opaque mask pixels by adding
interpolated values between them.
The value ranges from 0.0 (sharp mask edge) to 1.0 (smooth mask edge).
By default, the property is set to \c 0.0.
*/
-qreal QQuickMultiEffect::maskSpreadUp() const
+qreal QQuickMultiEffect::maskSpreadAtMax() const
{
Q_D(const QQuickMultiEffect);
- return d->maskSpreadUp();
+ return d->maskSpreadAtMax();
}
-void QQuickMultiEffect::setMaskSpreadUp(qreal spread)
+void QQuickMultiEffect::setMaskSpreadAtMax(qreal spread)
{
Q_D(QQuickMultiEffect);
- d->setMaskSpreadUp(spread);
+ d->setMaskSpreadAtMax(spread);
}
/*!
\qmlproperty bool QtQuick::MultiEffect::maskInverted
This property switches the mask to the opposite side; instead of
- masking away the content outside maskThresholdLow and maskThresholdUp,
+ masking away the content outside maskThresholdMin and maskThresholdMax,
content between them will get masked away.
By default, the property is set to \c false.
@@ -862,40 +862,40 @@ void QQuickMultiEffectPrivate::setSaturation(qreal saturation)
Q_EMIT q->saturationChanged();
}
-qreal QQuickMultiEffectPrivate::colorize() const
+qreal QQuickMultiEffectPrivate::colorization() const
{
- return m_colorize;
+ return m_colorization;
}
-void QQuickMultiEffectPrivate::setColorize(qreal colorize)
+void QQuickMultiEffectPrivate::setColorization(qreal colorization)
{
Q_Q(QQuickMultiEffect);
- if (colorize == m_colorize)
+ if (colorization == m_colorization)
return;
- m_colorize = colorize;
- updateColorizeColor();
+ m_colorization = colorization;
+ updateColorizationColor();
q->update();
- Q_EMIT q->colorizeChanged();
+ Q_EMIT q->colorizationChanged();
}
-QColor QQuickMultiEffectPrivate::colorizeColor() const
+QColor QQuickMultiEffectPrivate::colorizationColor() const
{
- return m_colorizeColor;
+ return m_colorizationColor;
}
-void QQuickMultiEffectPrivate::setColorizeColor(const QColor &color)
+void QQuickMultiEffectPrivate::setColorizationColor(const QColor &color)
{
Q_Q(QQuickMultiEffect);
- if (color == m_colorizeColor)
+ if (color == m_colorizationColor)
return;
- m_colorizeColor = color;
- updateColorizeColor();
+ m_colorizationColor = color;
+ updateColorizationColor();
q->update();
- Q_EMIT q->colorizeColorChanged();
+ Q_EMIT q->colorizationColorChanged();
}
bool QQuickMultiEffectPrivate::blurEnabled() const
@@ -1149,76 +1149,76 @@ void QQuickMultiEffectPrivate::setMaskSource(QQuickItem *item)
Q_EMIT q->maskSourceChanged();
}
-qreal QQuickMultiEffectPrivate::maskThresholdLow() const
+qreal QQuickMultiEffectPrivate::maskThresholdMin() const
{
- return m_maskThresholdLow;
+ return m_maskThresholdMin;
}
-void QQuickMultiEffectPrivate::setMaskThresholdLow(qreal threshold)
+void QQuickMultiEffectPrivate::setMaskThresholdMin(qreal threshold)
{
Q_Q(QQuickMultiEffect);
- if (threshold == m_maskThresholdLow)
+ if (threshold == m_maskThresholdMin)
return;
- m_maskThresholdLow = threshold;
+ m_maskThresholdMin = threshold;
updateMaskThresholdSpread();
q->update();
- Q_EMIT q->maskThresholdLowChanged();
+ Q_EMIT q->maskThresholdMinChanged();
}
-qreal QQuickMultiEffectPrivate::maskSpreadLow() const
+qreal QQuickMultiEffectPrivate::maskSpreadAtMin() const
{
- return m_maskSpreadLow;
+ return m_maskSpreadAtMin;
}
-void QQuickMultiEffectPrivate::setMaskSpreadLow(qreal spread)
+void QQuickMultiEffectPrivate::setMaskSpreadAtMin(qreal spread)
{
Q_Q(QQuickMultiEffect);
- if (spread == m_maskSpreadLow)
+ if (spread == m_maskSpreadAtMin)
return;
- m_maskSpreadLow = spread;
+ m_maskSpreadAtMin = spread;
updateMaskThresholdSpread();
q->update();
- Q_EMIT q->maskSpreadLowChanged();
+ Q_EMIT q->maskSpreadAtMinChanged();
}
-qreal QQuickMultiEffectPrivate::maskThresholdUp() const
+qreal QQuickMultiEffectPrivate::maskThresholdMax() const
{
- return m_maskThresholdUp;
+ return m_maskThresholdMax;
}
-void QQuickMultiEffectPrivate::setMaskThresholdUp(qreal threshold)
+void QQuickMultiEffectPrivate::setMaskThresholdMax(qreal threshold)
{
Q_Q(QQuickMultiEffect);
- if (threshold == m_maskThresholdUp)
+ if (threshold == m_maskThresholdMax)
return;
- m_maskThresholdUp = threshold;
+ m_maskThresholdMax = threshold;
updateMaskThresholdSpread();
q->update();
- Q_EMIT q->maskThresholdUpChanged();
+ Q_EMIT q->maskThresholdMaxChanged();
}
-qreal QQuickMultiEffectPrivate::maskSpreadUp() const
+qreal QQuickMultiEffectPrivate::maskSpreadAtMax() const
{
- return m_maskSpreadUp;
+ return m_maskSpreadAtMax;
}
-void QQuickMultiEffectPrivate::setMaskSpreadUp(qreal spread)
+void QQuickMultiEffectPrivate::setMaskSpreadAtMax(qreal spread)
{
Q_Q(QQuickMultiEffect);
- if (spread == m_maskSpreadUp)
+ if (spread == m_maskSpreadAtMax)
return;
- m_maskSpreadUp = spread;
+ m_maskSpreadAtMax = spread;
updateMaskThresholdSpread();
q->update();
- Q_EMIT q->maskSpreadUpChanged();
+ Q_EMIT q->maskSpreadAtMaxChanged();
}
bool QQuickMultiEffectPrivate::maskInverted() const
@@ -1297,7 +1297,7 @@ void QQuickMultiEffectPrivate::initialize()
updateMaskThresholdSpread();
updateBlurWeights();
updateShadowBlurWeights();
- updateColorizeColor();
+ updateColorizationColor();
updateShadowColor();
updateShadowOffset();
@@ -1330,10 +1330,10 @@ void QQuickMultiEffectPrivate::updateMaskThresholdSpread()
// smoothstep, keeping always edge0 < edge1.
const qreal c0 = 0.0001;
const qreal c1 = 1.0 - c0;
- const qreal mt1 = m_maskThresholdLow + c0;
- const qreal ms1 = m_maskSpreadLow + 1.0;
- const qreal mt2 = c1 - m_maskThresholdUp;
- const qreal ms2 = m_maskSpreadUp + 1.0;
+ const qreal mt1 = m_maskThresholdMin + c0;
+ const qreal ms1 = m_maskSpreadAtMin + 1.0;
+ const qreal mt2 = c1 - m_maskThresholdMax;
+ const qreal ms2 = m_maskSpreadAtMax + 1.0;
const QVector4D maskThresholdSpread = QVector4D(
mt1 * ms1 - (ms1 - c1),
mt1 * ms1,
@@ -1362,15 +1362,15 @@ void QQuickMultiEffectPrivate::updateShadowOffset()
m_shaderEffect->setProperty("shadowOffset", shadowOffset);
}
-void QQuickMultiEffectPrivate::updateColorizeColor()
+void QQuickMultiEffectPrivate::updateColorizationColor()
{
if (!m_shaderEffect)
return;
- int alpha = std::clamp(int(m_colorizeColor.alpha() * m_colorize), 0, 255);
- QColor colorizeColor = m_colorizeColor;
- colorizeColor.setAlpha(alpha);
- m_shaderEffect->setProperty("colorizeColor", colorizeColor);
+ int alpha = std::clamp(int(m_colorizationColor.alpha() * m_colorization), 0, 255);
+ QColor colorizationColor = m_colorizationColor;
+ colorizationColor.setAlpha(alpha);
+ m_shaderEffect->setProperty("colorizationColor", colorizationColor);
}
void QQuickMultiEffectPrivate::updateShadowColor()
diff --git a/src/effects/qquickmultieffect_p.h b/src/effects/qquickmultieffect_p.h
index 2dad0d90e0..1ba6143ac8 100644
--- a/src/effects/qquickmultieffect_p.h
+++ b/src/effects/qquickmultieffect_p.h
@@ -38,8 +38,8 @@ class Q_QUICKEFFECTS_PRIVATE_EXPORT QQuickMultiEffect : public QQuickItem
Q_PROPERTY(qreal brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged)
Q_PROPERTY(qreal contrast READ contrast WRITE setContrast NOTIFY contrastChanged)
Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation NOTIFY saturationChanged)
- Q_PROPERTY(qreal colorize READ colorize WRITE setColorize NOTIFY colorizeChanged)
- Q_PROPERTY(QColor colorizeColor READ colorizeColor WRITE setColorizeColor NOTIFY colorizeColorChanged)
+ Q_PROPERTY(qreal colorization READ colorization WRITE setColorization NOTIFY colorizationChanged)
+ Q_PROPERTY(QColor colorizationColor READ colorizationColor WRITE setColorizationColor NOTIFY colorizationColorChanged)
Q_PROPERTY(bool blurEnabled READ blurEnabled WRITE setBlurEnabled NOTIFY blurEnabledChanged)
Q_PROPERTY(qreal blur READ blur WRITE setBlur NOTIFY blurChanged)
Q_PROPERTY(int blurMax READ blurMax WRITE setBlurMax NOTIFY blurMaxChanged)
@@ -53,10 +53,10 @@ class Q_QUICKEFFECTS_PRIVATE_EXPORT QQuickMultiEffect : public QQuickItem
Q_PROPERTY(qreal shadowScale READ shadowScale WRITE setShadowScale NOTIFY shadowScaleChanged)
Q_PROPERTY(bool maskEnabled READ maskEnabled WRITE setMaskEnabled NOTIFY maskEnabledChanged)
Q_PROPERTY(QQuickItem *maskSource READ maskSource WRITE setMaskSource NOTIFY maskSourceChanged)
- Q_PROPERTY(qreal maskThresholdLow READ maskThresholdLow WRITE setMaskThresholdLow NOTIFY maskThresholdLowChanged)
- Q_PROPERTY(qreal maskSpreadLow READ maskSpreadLow WRITE setMaskSpreadLow NOTIFY maskSpreadLowChanged)
- Q_PROPERTY(qreal maskThresholdUp READ maskThresholdUp WRITE setMaskThresholdUp NOTIFY maskThresholdUpChanged)
- Q_PROPERTY(qreal maskSpreadUp READ maskSpreadUp WRITE setMaskSpreadUp NOTIFY maskSpreadUpChanged)
+ Q_PROPERTY(qreal maskThresholdMin READ maskThresholdMin WRITE setMaskThresholdMin NOTIFY maskThresholdMinChanged)
+ Q_PROPERTY(qreal maskSpreadAtMin READ maskSpreadAtMin WRITE setMaskSpreadAtMin NOTIFY maskSpreadAtMinChanged)
+ Q_PROPERTY(qreal maskThresholdMax READ maskThresholdMax WRITE setMaskThresholdMax NOTIFY maskThresholdMaxChanged)
+ Q_PROPERTY(qreal maskSpreadAtMax READ maskSpreadAtMax WRITE setMaskSpreadAtMax NOTIFY maskSpreadAtMaxChanged)
Q_PROPERTY(bool maskInverted READ maskInverted WRITE setMaskInverted NOTIFY maskInvertedChanged)
Q_PROPERTY(QRectF itemRect READ itemRect NOTIFY itemRectChanged)
Q_PROPERTY(QString fragmentShader READ fragmentShader NOTIFY fragmentShaderChanged)
@@ -87,11 +87,11 @@ public:
qreal saturation() const;
void setSaturation(qreal saturation);
- qreal colorize() const;
- void setColorize(qreal colorize);
+ qreal colorization() const;
+ void setColorization(qreal colorization);
- QColor colorizeColor() const;
- void setColorizeColor(const QColor &color);
+ QColor colorizationColor() const;
+ void setColorizationColor(const QColor &color);
bool blurEnabled() const;
void setBlurEnabled(bool enabled);
@@ -132,17 +132,17 @@ public:
QQuickItem *maskSource() const;
void setMaskSource(QQuickItem *item);
- qreal maskThresholdLow() const;
- void setMaskThresholdLow(qreal threshold);
+ qreal maskThresholdMin() const;
+ void setMaskThresholdMin(qreal threshold);
- qreal maskSpreadLow() const;
- void setMaskSpreadLow(qreal spread);
+ qreal maskSpreadAtMin() const;
+ void setMaskSpreadAtMin(qreal spread);
- qreal maskThresholdUp() const;
- void setMaskThresholdUp(qreal threshold);
+ qreal maskThresholdMax() const;
+ void setMaskThresholdMax(qreal threshold);
- qreal maskSpreadUp() const;
- void setMaskSpreadUp(qreal spread);
+ qreal maskSpreadAtMax() const;
+ void setMaskSpreadAtMax(qreal spread);
bool maskInverted() const;
void setMaskInverted(bool inverted);
@@ -161,8 +161,8 @@ Q_SIGNALS:
void brightnessChanged();
void contrastChanged();
void saturationChanged();
- void colorizeChanged();
- void colorizeColorChanged();
+ void colorizationChanged();
+ void colorizationColorChanged();
void blurEnabledChanged();
void blurChanged();
void blurMaxChanged();
@@ -176,10 +176,10 @@ Q_SIGNALS:
void shadowScaleChanged();
void maskEnabledChanged();
void maskSourceChanged();
- void maskThresholdLowChanged();
- void maskSpreadLowChanged();
- void maskThresholdUpChanged();
- void maskSpreadUpChanged();
+ void maskThresholdMinChanged();
+ void maskSpreadAtMinChanged();
+ void maskThresholdMaxChanged();
+ void maskSpreadAtMaxChanged();
void maskInvertedChanged();
void itemRectChanged();
void fragmentShaderChanged();
diff --git a/src/effects/qquickmultieffect_p_p.h b/src/effects/qquickmultieffect_p_p.h
index 29e7e60a6d..2df33db45b 100644
--- a/src/effects/qquickmultieffect_p_p.h
+++ b/src/effects/qquickmultieffect_p_p.h
@@ -54,11 +54,11 @@ public:
qreal saturation() const;
void setSaturation(qreal saturation);
- qreal colorize() const;
- void setColorize(qreal colorize);
+ qreal colorization() const;
+ void setColorization(qreal colorization);
- QColor colorizeColor() const;
- void setColorizeColor(const QColor &color);
+ QColor colorizationColor() const;
+ void setColorizationColor(const QColor &color);
bool blurEnabled() const;
void setBlurEnabled(bool enabled);
@@ -99,17 +99,17 @@ public:
QQuickItem *maskSource() const;
void setMaskSource(QQuickItem *item);
- qreal maskThresholdLow() const;
- void setMaskThresholdLow(qreal threshold);
+ qreal maskThresholdMin() const;
+ void setMaskThresholdMin(qreal threshold);
- qreal maskSpreadLow() const;
- void setMaskSpreadLow(qreal spread);
+ qreal maskSpreadAtMin() const;
+ void setMaskSpreadAtMin(qreal spread);
- qreal maskThresholdUp() const;
- void setMaskThresholdUp(qreal threshold);
+ qreal maskThresholdMax() const;
+ void setMaskThresholdMax(qreal threshold);
- qreal maskSpreadUp() const;
- void setMaskSpreadUp(qreal spread);
+ qreal maskSpreadAtMax() const;
+ void setMaskSpreadAtMax(qreal spread);
bool maskInverted() const;
void setMaskInverted(bool inverted);
@@ -125,7 +125,7 @@ public:
void updateMaskThresholdSpread();
void updateCenterOffset();
void updateShadowOffset();
- void updateColorizeColor();
+ void updateColorizationColor();
void updateShadowColor();
float calculateLod(float blurAmount);
float blurWeight(float v);
@@ -151,8 +151,8 @@ private:
qreal m_brightness = 0.0;
qreal m_contrast = 0.0;
qreal m_saturation = 0.0;
- qreal m_colorize = 0.0;
- QColor m_colorizeColor = { 255, 0, 0, 255 };
+ qreal m_colorization = 0.0;
+ QColor m_colorizationColor = { 255, 0, 0, 255 };
bool m_blurEnabled = false;
qreal m_blur = 0.0;
int m_blurMax = 32;
@@ -166,10 +166,10 @@ private:
qreal m_shadowScale = 1.0;
bool m_maskEnabled = false;
QQuickItem *m_maskSourceItem = nullptr;
- qreal m_maskThresholdLow = 0.0;
- qreal m_maskSpreadLow = 0.0;
- qreal m_maskThresholdUp = 1.0;
- qreal m_maskSpreadUp = 0.0;
+ qreal m_maskThresholdMin = 0.0;
+ qreal m_maskSpreadAtMin = 0.0;
+ qreal m_maskThresholdMax = 1.0;
+ qreal m_maskSpreadAtMax = 0.0;
bool m_maskInverted = false;
int m_blurLevel = 0;