summaryrefslogtreecommitdiffstats
path: root/tests/baseline/painting/scripts/radial_gradients_perspectives.qps
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2021-11-15 13:36:48 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-11-16 14:01:50 +0100
commite8f93e38debf4f46dbda4de198b9dd475df42d5c (patch)
treec042e1fea11d2b63788f1b8855030ecd96e13c19 /tests/baseline/painting/scripts/radial_gradients_perspectives.qps
parent9a131b59ee561e300fb6078886a85dd7b3c53599 (diff)
Rename and restructure the baseline (lancelot) testing code
In preparation for addition of new baseline tests, establish a new test category, "baseline". This is similar to the category "benchmarks" in that it contains tests that use the QTest framework, but conceptually are not unit tests, in contrast to those under auto/. Move the existing QPainter baseline test, tst_lancelot, into this new category, and rename it accordingly. Baseline tests use the QBaselineTest extension to QTest. Move that extension too into the tests/baseline directory, allowing the clean out of the baselineserver directory. Pick-to: 6.2 Change-Id: I1b527f5867c953b1d22be73798fcf7d1494712ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/baseline/painting/scripts/radial_gradients_perspectives.qps')
-rw-r--r--tests/baseline/painting/scripts/radial_gradients_perspectives.qps62
1 files changed, 62 insertions, 0 deletions
diff --git a/tests/baseline/painting/scripts/radial_gradients_perspectives.qps b/tests/baseline/painting/scripts/radial_gradients_perspectives.qps
new file mode 100644
index 0000000000..4557354dce
--- /dev/null
+++ b/tests/baseline/painting/scripts/radial_gradients_perspectives.qps
@@ -0,0 +1,62 @@
+# Version: 1
+
+
+setRenderHint Antialiasing
+
+setPen #00ff00
+
+translate 10 10
+# standard draw
+begin_block gradient
+gradient_clearStops
+gradient_appendStop 0 red
+gradient_appendStop 0.25 orange
+gradient_appendStop 0.5 yellow
+gradient_appendStop 0.8 green
+gradient_appendStop 1 cyan
+
+gradient_setSpread PadSpread
+gradient_setRadial 110 100 230 230 240
+drawRect 0 0 300 300
+end_block gradient
+
+# Rotation w/o smooth xform
+save
+translate 350 0
+save
+ setRenderHint SmoothPixmapTransform on
+ mapQuadToQuad 0 0 0 300 300 300 300 0 0 50 0 200 300 300 300 0
+ repeat_block gradient
+restore
+restore
+
+translate 0 320
+
+save
+ setRenderHint SmoothPixmapTransform on
+ mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 100 300 200 300 300 0
+ repeat_block gradient
+restore
+
+save
+translate 350 0
+save
+ setRenderHint SmoothPixmapTransform on
+ mapQuadToQuad 0 0 0 300 300 300 300 0 0 0 0 300 300 250 300 50
+ repeat_block gradient
+restore
+restore
+
+
+resetMatrix
+setPen black
+translate 125 20
+drawText 0 0 "No transform"
+translate 350 0
+drawText 0 0 "Left Tilted"
+resetMatrix
+translate 125 350
+drawText 0 0 "Bottom Tilted"
+translate 350 0
+drawText 0 0 "Right Tilted"
+translate 120 0 \ No newline at end of file