diff options
Diffstat (limited to 'tests/manual/scenegraph_lancelot')
3 files changed, 92 insertions, 73 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/attributes.qml b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/attributes.qml deleted file mode 100644 index 17d9aadf95..0000000000 --- a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/attributes.qml +++ /dev/null @@ -1,65 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - width: 320 - height: 480 - - Text { - id: text - font.pixelSize: 80 - text: "Shaderz!" - } - - ShaderEffectSource { - id: source - sourceItem: text - hideSource: true - smooth: true - } - Column { - ShaderEffect { - width: 320 - height: 160 - property variant source: source - vertexShader: " - uniform highp mat4 qt_Matrix; - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - varying highp vec2 qt_TexCoord0; - void main() { - gl_Position = qt_Matrix * qt_Vertex; - qt_TexCoord0 = qt_MultiTexCoord0; - }" - } - ShaderEffect { - width: 320 - height: 160 - property variant source: source - vertexShader: " - attribute highp vec2 qt_MultiTexCoord0; - uniform highp mat4 qt_Matrix; - attribute highp vec4 qt_Vertex; - varying highp vec2 qt_TexCoord0; - void main() { - gl_Position = qt_Matrix * qt_Vertex; - qt_TexCoord0 = qt_MultiTexCoord0; - }" - } - ShaderEffect { - width: 320 - height: 160 - property variant source: source - vertexShader: " - attribute highp vec2 qt_MultiTexCoord0; - uniform highp mat4 qt_Matrix; - attribute highp vec4 qt_Vertex; - varying highp vec2 qt_TexCoord0; - uniform highp float width; - uniform highp float height; - void main() { - gl_Position = qt_Matrix * qt_Vertex; - qt_TexCoord0 = qt_Vertex.xy / vec2(width, height); - }" - } - } -} diff --git a/tests/manual/scenegraph_lancelot/data/shaders/source/switch_3.qml b/tests/manual/scenegraph_lancelot/data/shaders/source/switch_3.qml index 0d3c1fc4ee..c02dfba9e2 100644 --- a/tests/manual/scenegraph_lancelot/data/shaders/source/switch_3.qml +++ b/tests/manual/scenegraph_lancelot/data/shaders/source/switch_3.qml @@ -47,14 +47,7 @@ Item { property variant source: source - fragmentShader: " - uniform lowp sampler2D source; - varying highp vec2 qt_TexCoord0; - uniform lowp float qt_Opacity; - void main() { - gl_FragColor = vec4(qt_TexCoord0.x, qt_TexCoord0.y, 1, 1) * texture2D(source, qt_TexCoord0).a; - } - " + fragmentShader: "qrc:shaders/gradient.frag" } diff --git a/tests/manual/scenegraph_lancelot/data/shape/shape_text.qml b/tests/manual/scenegraph_lancelot/data/shape/shape_text.qml new file mode 100644 index 0000000000..37367054b5 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/shape/shape_text.qml @@ -0,0 +1,91 @@ +import QtQuick 2.15 +import QtQuick.Shapes 1.0 + +Item { + width: 320 + height: 480 + + Column { + Item { + width: 200 + height: 160 + + Shape { + anchors.fill: parent + vendorExtensionsEnabled: false + + ShapePath { + fillColor: "transparent" + strokeColor: "blue" + strokeStyle: ShapePath.DashLine + strokeWidth: 4 + + PathText { + x: 96 + y: 10 + font.pixelSize: 120 + text: "Qt" + } + } + } + } + + Item { + width: 200 + height: 160 + + Rectangle { + anchors.fill: parent + color: "blue" + } + + Shape { + anchors.fill: parent + vendorExtensionsEnabled: false + + ShapePath { + fillColor: "red" + strokeColor: "blue" + strokeStyle: ShapePath.DashLine + capStyle: ShapePath.RoundCap + strokeWidth: 8 + + PathText { + x: 96; y: 10 + font.pixelSize: 150 + text: "Qt" + } + } + } + } + + Item { + width: 200 + height: 160 + + Shape { + anchors.fill: parent + vendorExtensionsEnabled: false + + ShapePath { + fillGradient: LinearGradient { + x1: 0; x2: 200; y1: 0; y2: 160 + spread: ShapeGradient.PadSpread + GradientStop { position: 0.0; color: "red"; } + GradientStop { position: 1.0; color: "green"; } + } + strokeColor: "blue" + strokeStyle: ShapePath.DashLine + joinStyle: ShapePath.RoundJoin + strokeWidth: 4 + + PathText { + x: 96; y: 10 + font.pixelSize: 150 + text: "Qt" + } + } + } + } + } +} |