Initial commit

This commit is contained in:
2026-04-29 07:19:21 +03:00
commit 9a8cdfa08a
5964 changed files with 1194660 additions and 0 deletions
@@ -0,0 +1,63 @@
// Copyright (C) 2017 Jolla Ltd, author: <gunnar.sletta@jollamobile.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default
import QtQuick
import Qt5Compat.GraphicalEffects.private
import Qt5Compat.GraphicalEffects
Item {
id: root
property variant source
property real radius: Math.floor(samples / 2)
property int samples: 9
property color color: "black"
property real horizontalOffset: 0
property real verticalOffset: 0
property real spread: 0.0
property bool cached: false
property bool transparentBorder: true
GaussianBlur {
id: blur
width: parent.width
height: parent.height
x: Math.round(horizontalOffset)
y: Math.round(verticalOffset)
source: root.source
radius: root.radius * Screen.devicePixelRatio
samples: root.samples * Screen.devicePixelRatio
_thickness: root.spread
transparentBorder: root.transparentBorder
_color: root.color;
_alphaOnly: true
// ignoreDevicePixelRatio: root.ignoreDevicePixelRatio
ShaderEffect {
x: blur._outputRect.x - parent.x
y: blur._outputRect.y - parent.y
width: transparentBorder ? blur._outputRect.width : blur.width
height: transparentBorder ? blur._outputRect.height : blur.height
property variant source: blur._output;
}
}
ShaderEffectSource {
id: cacheItem
x: -blur._kernelRadius + horizontalOffset
y: -blur._kernelRadius + verticalOffset
width: blur.width + 2 * blur._kernelRadius
height: blur.height + 2 * blur._kernelRadius
visible: root.cached
smooth: true
sourceRect: Qt.rect(-blur._kernelRadius, -blur._kernelRadius, width, height);
sourceItem: blur
hideSource: visible
}
}
@@ -0,0 +1,296 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default
import QtQuick
import Qt5Compat.GraphicalEffects.private
Item {
id: rootItem
property variant source
property real spread: 0.0
property real blur: 0.0
property color color: "white"
property bool transparentBorder: false
property bool cached: false
SourceProxy {
id: sourceProxy
input: rootItem.source
}
ShaderEffectSource {
id: cacheItem
anchors.fill: shaderItem
visible: rootItem.cached
smooth: true
sourceItem: shaderItem
live: true
hideSource: visible
}
property string __internalBlurVertexShader: "qrc:/qt-project.org/imports/Qt5Compat/GraphicalEffects/shaders_ng/fastblur_internal.vert.qsb"
property string __internalBlurFragmentShader: "qrc:/qt-project.org/imports/Qt5Compat/GraphicalEffects/shaders_ng/fastblur_internal.frag.qsb"
ShaderEffect {
id: level0
property variant source: sourceProxy.output
anchors.fill: parent
visible: false
smooth: true
}
ShaderEffectSource {
id: level1
width: Math.ceil(shaderItem.width / 32) * 32
height: Math.ceil(shaderItem.height / 32) * 32
sourceItem: level0
hideSource: rootItem.visible
sourceRect: transparentBorder ? Qt.rect(-64, -64, shaderItem.width, shaderItem.height) : Qt.rect(0,0,0,0)
smooth: true
visible: false
}
ShaderEffect {
id: effect1
property variant source: level1
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level2
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level2
width: level1.width / 2
height: level1.height / 2
sourceItem: effect1
hideSource: rootItem.visible
visible: false
smooth: true
}
ShaderEffect {
id: effect2
property variant source: level2
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level3
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level3
width: level2.width / 2
height: level2.height / 2
sourceItem: effect2
hideSource: rootItem.visible
visible: false
smooth: true
}
ShaderEffect {
id: effect3
property variant source: level3
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level4
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level4
width: level3.width / 2
height: level3.height / 2
sourceItem: effect3
hideSource: rootItem.visible
visible: false
smooth: true
}
ShaderEffect {
id: effect4
property variant source: level4
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level5
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level5
width: level4.width / 2
height: level4.height / 2
sourceItem: effect4
hideSource: rootItem.visible
visible: false
smooth: true
}
ShaderEffect {
id: effect5
property variant source: level5
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level6
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level6
width: level5.width / 2
height: level5.height / 2
sourceItem: effect5
hideSource: rootItem.visible
visible: false
smooth: true
}
Item {
id: dummysource
width: 1
height: 1
visible: false
}
ShaderEffectSource {
id: dummy
width: 1
height: 1
sourceItem: dummysource
visible: false
smooth: false
live: false
}
ShaderEffect {
id: shaderItem
x: transparentBorder ? -64 : 0
y: transparentBorder ? -64 : 0
width: transparentBorder ? parent.width + 128 : parent.width
height: transparentBorder ? parent.height + 128 : parent.height
property variant source1: level1
property variant source2: level2
property variant source3: level3
property variant source4: level4
property variant source5: level5
property variant source6: level6
property real lod: rootItem.blur
property real weight1;
property real weight2;
property real weight3;
property real weight4;
property real weight5;
property real weight6;
property real spread: 1.0 - (rootItem.spread * 0.98)
property alias color: rootItem.color
function weight(v) {
if (v <= 0.0)
return 1
if (v >= 0.5)
return 0
return 1.0 - v / 0.5
}
function calculateWeights() {
var w1 = weight(Math.abs(lod - 0.100))
var w2 = weight(Math.abs(lod - 0.300))
var w3 = weight(Math.abs(lod - 0.500))
var w4 = weight(Math.abs(lod - 0.700))
var w5 = weight(Math.abs(lod - 0.900))
var w6 = weight(Math.abs(lod - 1.100))
var sum = w1 + w2 + w3 + w4 + w5 + w6;
weight1 = w1 / sum;
weight2 = w2 / sum;
weight3 = w3 / sum;
weight4 = w4 / sum;
weight5 = w5 / sum;
weight6 = w6 / sum;
upateSources()
}
function upateSources() {
var sources = new Array();
var weights = new Array();
if (weight1 > 0) {
sources.push(level1)
weights.push(weight1)
}
if (weight2 > 0) {
sources.push(level2)
weights.push(weight2)
}
if (weight3 > 0) {
sources.push(level3)
weights.push(weight3)
}
if (weight4 > 0) {
sources.push(level4)
weights.push(weight4)
}
if (weight5 > 0) {
sources.push(level5)
weights.push(weight5)
}
if (weight6 > 0) {
sources.push(level6)
weights.push(weight6)
}
for (var j = sources.length; j < 6; j++) {
sources.push(dummy)
weights.push(0.0)
}
source1 = sources[0]
source2 = sources[1]
source3 = sources[2]
source4 = sources[3]
source5 = sources[4]
source6 = sources[5]
weight1 = weights[0]
weight2 = weights[1]
weight3 = weights[2]
weight4 = weights[3]
weight5 = weights[4]
weight6 = weights[5]
}
Component.onCompleted: calculateWeights()
onLodChanged: calculateWeights()
fragmentShader: "qrc:/qt-project.org/imports/Qt5Compat/GraphicalEffects/shaders_ng/fastglow.frag.qsb"
}
}
@@ -0,0 +1,300 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default
import QtQuick
import Qt5Compat.GraphicalEffects.private
Item {
id: rootItem
property variant source
property real blur: 0.0
property real horizontalOffset: 0
property real verticalOffset: 0
property real spread: 0.0
property color color: "black"
property bool cached: false
SourceProxy {
id: sourceProxy
input: rootItem.source
}
ShaderEffectSource {
id: cacheItem
anchors.fill: shaderItem
visible: rootItem.cached
smooth: true
sourceItem: shaderItem
live: true
hideSource: visible
}
property string __internalBlurVertexShader: "qrc:/qt-project.org/imports/Qt5Compat/GraphicalEffects/shaders_ng/fastblur_internal.vert.qsb"
property string __internalBlurFragmentShader: "qrc:/qt-project.org/imports/Qt5Compat/GraphicalEffects/shaders_ng/fastblur_internal.frag.qsb"
ShaderEffect {
id: level0
property variant source: sourceProxy.output
property real horizontalOffset: rootItem.horizontalOffset / rootItem.width
property real verticalOffset: rootItem.verticalOffset / rootItem.width
property color color: rootItem.color
anchors.fill: parent
visible: false
smooth: true
fragmentShader: "qrc:/qt-project.org/imports/Qt5Compat/GraphicalEffects/shaders_ng/fastinnershadow_level0.frag.qsb"
}
ShaderEffectSource {
id: level1
width: Math.ceil(shaderItem.width / 32) * 32
height: Math.ceil(shaderItem.height / 32) * 32
sourceItem: level0
hideSource: rootItem.visible
smooth: true
visible: false
}
ShaderEffect {
id: effect1
property variant source: level1
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level2
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level2
width: level1.width / 2
height: level1.height / 2
sourceItem: effect1
hideSource: rootItem.visible
visible: false
smooth: true
}
ShaderEffect {
id: effect2
property variant source: level2
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level3
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level3
width: level2.width / 2
height: level2.height / 2
sourceItem: effect2
hideSource: rootItem.visible
visible: false
smooth: true
}
ShaderEffect {
id: effect3
property variant source: level3
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level4
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level4
width: level3.width / 2
height: level3.height / 2
sourceItem: effect3
hideSource: rootItem.visible
visible: false
smooth: true
}
ShaderEffect {
id: effect4
property variant source: level4
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level5
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level5
width: level4.width / 2
height: level4.height / 2
sourceItem: effect4
hideSource: rootItem.visible
visible: false
smooth: true
}
ShaderEffect {
id: effect5
property variant source: level5
property real yStep: 1/height
property real xStep: 1/width
anchors.fill: level6
visible: false
smooth: true
vertexShader: __internalBlurVertexShader
fragmentShader: __internalBlurFragmentShader
}
ShaderEffectSource {
id: level6
width: level5.width / 2
height: level5.height / 2
sourceItem: effect5
hideSource: rootItem.visible
visible: false
smooth: true
}
Item {
id: dummysource
width: 1
height: 1
visible: false
}
ShaderEffectSource {
id: dummy
width: 1
height: 1
sourceItem: dummysource
visible: false
smooth: false
live: false
}
ShaderEffect {
id: shaderItem
width: parent.width
height: parent.height
property variant original: sourceProxy.output
property variant source1: level1
property variant source2: level2
property variant source3: level3
property variant source4: level4
property variant source5: level5
property variant source6: level6
property real lod: rootItem.blur
property real weight1;
property real weight2;
property real weight3;
property real weight4;
property real weight5;
property real weight6;
property real spread: 1.0 - (rootItem.spread * 0.98)
property color color: rootItem.color
function weight(v) {
if (v <= 0.0)
return 1
if (v >= 0.5)
return 0
return 1.0 - v / 0.5
}
function calculateWeights() {
var w1 = weight(Math.abs(lod - 0.100))
var w2 = weight(Math.abs(lod - 0.300))
var w3 = weight(Math.abs(lod - 0.500))
var w4 = weight(Math.abs(lod - 0.700))
var w5 = weight(Math.abs(lod - 0.900))
var w6 = weight(Math.abs(lod - 1.100))
var sum = w1 + w2 + w3 + w4 + w5 + w6;
weight1 = w1 / sum;
weight2 = w2 / sum;
weight3 = w3 / sum;
weight4 = w4 / sum;
weight5 = w5 / sum;
weight6 = w6 / sum;
upateSources()
}
function upateSources() {
var sources = new Array();
var weights = new Array();
if (weight1 > 0) {
sources.push(level1)
weights.push(weight1)
}
if (weight2 > 0) {
sources.push(level2)
weights.push(weight2)
}
if (weight3 > 0) {
sources.push(level3)
weights.push(weight3)
}
if (weight4 > 0) {
sources.push(level4)
weights.push(weight4)
}
if (weight5 > 0) {
sources.push(level5)
weights.push(weight5)
}
if (weight6 > 0) {
sources.push(level6)
weights.push(weight6)
}
for (var j = sources.length; j < 6; j++) {
sources.push(dummy)
weights.push(0.0)
}
source1 = sources[0]
source2 = sources[1]
source3 = sources[2]
source4 = sources[3]
source5 = sources[4]
source6 = sources[5]
weight1 = weights[0]
weight2 = weights[1]
weight3 = weights[2]
weight4 = weights[3]
weight5 = weights[4]
weight6 = weights[5]
}
Component.onCompleted: calculateWeights()
onLodChanged: calculateWeights()
fragmentShader: "qrc:/qt-project.org/imports/Qt5Compat/GraphicalEffects/shaders_ng/fastinnershadow.frag.qsb"
}
}
@@ -0,0 +1,256 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default
import QtQuick
import Qt5Compat.GraphicalEffects.private
Item {
id: rootItem
property variant source
property real deviation: (radius + 1) / 3.3333
property real radius: 0.0
property int maximumRadius: 0
property real horizontalStep: 0.0
property real verticalStep: 0.0
property bool transparentBorder: false
property bool cached: false
property bool enableColor: false
property color color: "white"
property real spread: 0.0
property bool enableMask: false
property variant maskSource
SourceProxy {
id: sourceProxy
input: rootItem.source
}
SourceProxy {
id: maskSourceProxy
input: rootItem.maskSource
}
ShaderEffectSource {
id: cacheItem
anchors.fill: rootItem
visible: rootItem.cached
smooth: true
sourceItem: shaderItem
live: true
hideSource: visible
}
ShaderEffect {
id: shaderItem
property variant source: sourceProxy.output
property real deviation: Math.max(0.1, rootItem.deviation)
property real radius: rootItem.radius
property int maxRadius: rootItem.maximumRadius
property bool transparentBorder: rootItem.transparentBorder
property real gaussianSum: 0.0
property real startIndex: 0.0
property real deltaFactor: (2 * radius - 1) / (maxRadius * 2 - 1)
property real expandX: transparentBorder && rootItem.horizontalStep > 0 ? maxRadius / width : 0.0
property real expandY: transparentBorder && rootItem.verticalStep > 0 ? maxRadius / height : 0.0
property variant gwts: []
property variant delta: Qt.vector3d(rootItem.horizontalStep * deltaFactor, rootItem.verticalStep * deltaFactor, startIndex);
property variant factor_0_2: Qt.vector3d(gwts[0], gwts[1], gwts[2]);
property variant factor_3_5: Qt.vector3d(gwts[3], gwts[4], gwts[5]);
property variant factor_6_8: Qt.vector3d(gwts[6], gwts[7], gwts[8]);
property variant factor_9_11: Qt.vector3d(gwts[9], gwts[10], gwts[11]);
property variant factor_12_14: Qt.vector3d(gwts[12], gwts[13], gwts[14]);
property variant factor_15_17: Qt.vector3d(gwts[15], gwts[16], gwts[17]);
property variant factor_18_20: Qt.vector3d(gwts[18], gwts[19], gwts[20]);
property variant factor_21_23: Qt.vector3d(gwts[21], gwts[22], gwts[23]);
property variant factor_24_26: Qt.vector3d(gwts[24], gwts[25], gwts[26]);
property variant factor_27_29: Qt.vector3d(gwts[27], gwts[28], gwts[29]);
property variant factor_30_31: Qt.point(gwts[30], gwts[31]);
property color color: rootItem.color
property real spread: 1.0 - (rootItem.spread * 0.98)
property variant maskSource: maskSourceProxy.output
anchors.fill: rootItem
function gausFunc(x){
//Gaussian function = h(x):=(1/sqrt(2*3.14159*(D^2))) * %e^(-(x^2)/(2*(D^2)));
return (1.0 / Math.sqrt(2 * Math.PI * (Math.pow(shaderItem.deviation, 2)))) * Math.pow(Math.E, -((Math.pow(x, 2)) / (2 * (Math.pow(shaderItem.deviation, 2)))));
}
function updateGaussianWeights() {
gaussianSum = 0.0;
startIndex = -maxRadius + 0.5
var n = new Array(32);
for (var j = 0; j < 32; j++)
n[j] = 0;
var max = maxRadius * 2
var delta = (2 * radius - 1) / (max - 1);
for (var i = 0; i < max; i++) {
n[i] = gausFunc(-radius + 0.5 + i * delta);
gaussianSum += n[i];
}
gwts = n;
}
function buildFragmentShader() {
var shaderSteps = [
"fragColor += texture(source, texCoord) * factor_0_2.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_0_2.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_0_2.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_3_5.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_3_5.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_3_5.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_6_8.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_6_8.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_6_8.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_9_11.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_9_11.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_9_11.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_12_14.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_12_14.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_12_14.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_15_17.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_15_17.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_15_17.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_18_20.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_18_20.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_18_20.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_21_23.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_21_23.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_21_23.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_24_26.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_24_26.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_24_26.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_27_29.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_27_29.y; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_27_29.z; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_30_31.x; texCoord += shift;",
"fragColor += texture(source, texCoord) * factor_30_31.y; texCoord += shift;"
]
var shader = fragmentShaderBegin
var samples = maxRadius * 2
if (samples > 32) {
console.log("DirectionalGaussianBlur.qml WARNING: Maximum of blur radius (16) exceeded!")
samples = 32
}
for (var i = 0; i < samples; i++) {
shader += shaderSteps[i]
}
shader += fragmentShaderEnd
var colorizeSteps = ""
var colorizeUniforms = ""
var maskSteps = ""
var maskUniforms = ""
if (enableColor) {
colorizeSteps += "fragColor = mix(vec4(0), color, clamp((fragColor.a - 0.0) / (spread - 0.0), 0.0, 1.0));\n"
colorizeUniforms += "vec4 color;\n"
colorizeUniforms += "float spread;\n"
}
if (enableMask) {
maskSteps += "shift *= texture(maskSource, qt_TexCoord0).a;\n"
maskUniforms += "layout(binding = 2) uniform sampler2D maskSource;\n"
}
shader = shader.replace("PLACEHOLDER_COLORIZE_STEPS", colorizeSteps)
shader = shader.replace("PLACEHOLDER_COLORIZE_UNIFORMS", colorizeUniforms)
shader = shader.replace("PLACEHOLDER_MASK_STEPS", maskSteps)
shader = shader.replace("PLACEHOLDER_MASK_UNIFORMS", maskUniforms)
fragmentShader = ShaderBuilder.buildFragmentShader(shader)
}
onDeviationChanged: updateGaussianWeights()
onRadiusChanged: updateGaussianWeights()
onTransparentBorderChanged: {
buildFragmentShader()
updateGaussianWeights()
}
onMaxRadiusChanged: {
buildFragmentShader()
updateGaussianWeights()
}
Component.onCompleted: {
buildFragmentShader()
updateGaussianWeights()
}
property string fragmentShaderBegin: "#version 440
layout(location = 0) in vec2 qt_TexCoord0;
layout(location = 0) out vec4 fragColor;
layout(std140, binding = 0) uniform buf {
mat4 qt_Matrix;
float qt_Opacity;
vec3 delta;
vec3 factor_0_2;
vec3 factor_3_5;
vec3 factor_6_8;
vec3 factor_9_11;
vec3 factor_12_14;
vec3 factor_15_17;
vec3 factor_18_20;
vec3 factor_21_23;
vec3 factor_24_26;
vec3 factor_27_29;
vec2 factor_30_31;
float gaussianSum;
float expandX;
float expandY;
PLACEHOLDER_COLORIZE_UNIFORMS
};
layout(binding = 1) uniform sampler2D source;
PLACEHOLDER_MASK_UNIFORMS
void main() {
vec2 shift = vec2(delta.x, delta.y);
PLACEHOLDER_MASK_STEPS
float index = delta.z;
vec2 texCoord = qt_TexCoord0;
texCoord.s = (texCoord.s - expandX) / (1.0 - 2.0 * expandX);
texCoord.t = (texCoord.t - expandY) / (1.0 - 2.0 * expandY);
texCoord += (shift * index);
fragColor = vec4(0.0, 0.0, 0.0, 0.0);
"
property string fragmentShaderEnd: "
fragColor /= gaussianSum;
PLACEHOLDER_COLORIZE_STEPS
fragColor *= qt_Opacity;
}
"
}
}
@@ -0,0 +1,63 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default
import QtQuick
import Qt5Compat.GraphicalEffects.private
Item {
id: rootItem
property variant source
property real radius: 0.0
property int maximumRadius: 0
property real spread: 0.0
property color color: "white"
property bool cached: false
property bool transparentBorder: false
SourceProxy {
id: sourceProxy
input: rootItem.source
sourceRect: rootItem.transparentBorder ? Qt.rect(-1, -1, parent.width + 2.0, parent.height + 2.0) : Qt.rect(0, 0, 0, 0)
}
ShaderEffectSource {
id: cacheItem
anchors.fill: shaderItem
visible: rootItem.cached
smooth: true
sourceItem: shaderItem
live: true
hideSource: visible
}
GaussianDirectionalBlur {
id: shaderItem
x: transparentBorder ? -maximumRadius - 1 : 0
y: transparentBorder ? -maximumRadius - 1 : 0
width: horizontalBlur.width
height: horizontalBlur.height
horizontalStep: 0.0
verticalStep: 1.0 / parent.height
source: horizontalBlur
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
transparentBorder: rootItem.transparentBorder
enableColor: true
color: rootItem.color
spread: rootItem.spread
}
GaussianDirectionalBlur {
id: horizontalBlur
width: transparentBorder ? parent.width + 2 * maximumRadius + 2 : parent.width
height: transparentBorder ? parent.height + 2 * maximumRadius + 2 : parent.height
horizontalStep: 1.0 / parent.width
verticalStep: 0.0
source: sourceProxy.output
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
transparentBorder: rootItem.transparentBorder
visible: false
}
}
@@ -0,0 +1,88 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default
import QtQuick
import Qt5Compat.GraphicalEffects.private
Item {
id: rootItem
property variant source
property real radius: 0.0
property int maximumRadius: 0
property real horizontalOffset: 0
property real verticalOffset: 0
property real spread: 0
property color color: "black"
property bool cached: false
SourceProxy {
id: sourceProxy
input: rootItem.source
}
ShaderEffectSource {
id: cacheItem
anchors.fill: shaderItem
visible: rootItem.cached
smooth: true
sourceItem: shaderItem
live: true
hideSource: visible
}
ShaderEffect{
id: shadowItem
anchors.fill: parent
property variant original: sourceProxy.output
property color color: rootItem.color
property real horizontalOffset: rootItem.horizontalOffset / rootItem.width
property real verticalOffset: rootItem.verticalOffset / rootItem.height
visible: false
fragmentShader: "qrc:/qt-project.org/imports/Qt5Compat/GraphicalEffects/shaders_ng/gaussianinnershadow_shadow.frag.qsb"
}
GaussianDirectionalBlur {
id: blurItem
anchors.fill: parent
horizontalStep: 0.0
verticalStep: 1.0 / parent.height
source: horizontalBlur
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
visible: false
}
GaussianDirectionalBlur {
id: horizontalBlur
width: transparentBorder ? parent.width + 2 * maximumRadius : parent.width
height: parent.height
horizontalStep: 1.0 / parent.width
verticalStep: 0.0
source: shadowItem
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
visible: false
}
ShaderEffectSource {
id: blurredSource
sourceItem: blurItem
live: true
smooth: true
}
ShaderEffect {
id: shaderItem
anchors.fill: parent
property variant original: sourceProxy.output
property variant shadow: blurredSource
property real spread: 1.0 - (rootItem.spread * 0.98)
property color color: rootItem.color
fragmentShader: "qrc:/qt-project.org/imports/Qt5Compat/GraphicalEffects/shaders_ng/gaussianinnershadow.frag.qsb"
}
}
@@ -0,0 +1,69 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
// Qt-Security score:significant reason:default
import QtQuick
import Qt5Compat.GraphicalEffects.private
Item {
id: rootItem
property variant source
property variant maskSource
property real radius: 0.0
property int maximumRadius: 0
property bool cached: false
property bool transparentBorder: false
SourceProxy {
id: sourceProxy
input: rootItem.source
sourceRect: rootItem.transparentBorder ? Qt.rect(-1, -1, parent.width + 2.0, parent.height + 2.0) : Qt.rect(0, 0, 0, 0)
}
SourceProxy {
id: maskSourceProxy
input: rootItem.maskSource
sourceRect: rootItem.transparentBorder ? Qt.rect(-1, -1, parent.width + 2.0, parent.height + 2.0) : Qt.rect(0, 0, 0, 0)
}
ShaderEffectSource {
id: cacheItem
anchors.fill: blur
visible: rootItem.cached
smooth: true
sourceItem: blur
live: true
hideSource: visible
}
GaussianDirectionalBlur {
id: blur
x: transparentBorder ? -maximumRadius - 1: 0
y: transparentBorder ? -maximumRadius - 1: 0
width: horizontalBlur.width
height: horizontalBlur.height
horizontalStep: 0.0
verticalStep: 1.0 / parent.height
source: horizontalBlur
enableMask: true
maskSource: maskSourceProxy.output
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
transparentBorder: rootItem.transparentBorder
}
GaussianDirectionalBlur {
id: horizontalBlur
width: transparentBorder ? parent.width + 2 * maximumRadius + 2 : parent.width
height: transparentBorder ? parent.height + 2 * maximumRadius + 2 : parent.height
horizontalStep: 1.0 / parent.width
verticalStep: 0.0
source: sourceProxy.output
enableMask: true
maskSource: maskSourceProxy.output
radius: rootItem.radius
maximumRadius: rootItem.maximumRadius
transparentBorder: rootItem.transparentBorder
visible: false
}
}
@@ -0,0 +1,120 @@
import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by qmltyperegistrar.
Module {
Component {
file: "qgfxshaderbuilder_p.h"
lineNumber: 20
name: "QGfxShaderBuilder"
accessSemantics: "reference"
prototype: "QObject"
exports: [
"Qt5Compat.GraphicalEffects.private/ShaderBuilder 5.0",
"Qt5Compat.GraphicalEffects.private/ShaderBuilder 6.0"
]
isCreatable: false
isSingleton: true
exportMetaObjectRevisions: [1280, 1536]
Method {
name: "gaussianBlur"
type: "QVariantMap"
lineNumber: 31
Parameter { name: "parameters"; type: "QJSValue" }
}
Method {
name: "buildVertexShader"
type: "QUrl"
lineNumber: 32
Parameter { name: "code"; type: "QByteArray" }
}
Method {
name: "buildFragmentShader"
type: "QUrl"
lineNumber: 33
Parameter { name: "code"; type: "QByteArray" }
}
}
Component {
file: "qgfxsourceproxy_p.h"
lineNumber: 18
name: "QGfxSourceProxy"
accessSemantics: "reference"
defaultProperty: "data"
parentProperty: "parent"
prototype: "QQuickItem"
exports: [
"Qt5Compat.GraphicalEffects.private/SourceProxy 5.0",
"Qt5Compat.GraphicalEffects.private/SourceProxy 6.0",
"Qt5Compat.GraphicalEffects.private/SourceProxy 6.3",
"Qt5Compat.GraphicalEffects.private/SourceProxy 6.7"
]
exportMetaObjectRevisions: [1280, 1536, 1539, 1543]
Enum {
name: "Interpolation"
lineNumber: 34
values: [
"AnyInterpolation",
"NearestInterpolation",
"LinearInterpolation"
]
}
Property {
name: "input"
type: "QQuickItem"
isPointer: true
read: "input"
write: "setInput"
reset: "resetInput"
notify: "inputChanged"
index: 0
lineNumber: 22
}
Property {
name: "output"
type: "QQuickItem"
isPointer: true
read: "output"
notify: "outputChanged"
index: 1
lineNumber: 23
isReadonly: true
}
Property {
name: "sourceRect"
type: "QRectF"
read: "sourceRect"
write: "setSourceRect"
notify: "sourceRectChanged"
index: 2
lineNumber: 24
}
Property {
name: "active"
type: "bool"
read: "isActive"
notify: "activeChanged"
index: 3
lineNumber: 26
isReadonly: true
}
Property {
name: "interpolation"
type: "Interpolation"
read: "interpolation"
write: "setInterpolation"
notify: "interpolationChanged"
index: 4
lineNumber: 27
}
Signal { name: "inputChanged"; lineNumber: 62 }
Signal { name: "outputChanged"; lineNumber: 63 }
Signal { name: "sourceRectChanged"; lineNumber: 64 }
Signal { name: "activeChanged"; lineNumber: 65 }
Signal { name: "interpolationChanged"; lineNumber: 66 }
Method { name: "repolish"; lineNumber: 69 }
}
}
@@ -0,0 +1,22 @@
module Qt5Compat.GraphicalEffects.private
linktarget Qt6::qtgraphicaleffectsprivate
optional plugin qtgraphicaleffectsprivateplugin
classname QtGraphicalEffectsPrivatePlugin
typeinfo plugins.qmltypes
prefer :/qt-project.org/imports/Qt5Compat/GraphicalEffects/private/
DropShadowBase 6.0 DropShadowBase.qml
DropShadowBase 1.0 DropShadowBase.qml
FastGlow 6.0 FastGlow.qml
FastGlow 1.0 FastGlow.qml
FastInnerShadow 6.0 FastInnerShadow.qml
FastInnerShadow 1.0 FastInnerShadow.qml
GaussianDirectionalBlur 6.0 GaussianDirectionalBlur.qml
GaussianDirectionalBlur 1.0 GaussianDirectionalBlur.qml
GaussianGlow 6.0 GaussianGlow.qml
GaussianGlow 1.0 GaussianGlow.qml
GaussianInnerShadow 6.0 GaussianInnerShadow.qml
GaussianInnerShadow 1.0 GaussianInnerShadow.qml
GaussianMaskedBlur 6.0 GaussianMaskedBlur.qml
GaussianMaskedBlur 1.0 GaussianMaskedBlur.qml
depends QtQuick