summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/lancelot/scripts
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2021-09-23 10:00:22 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2021-09-28 20:26:47 +0000
commit9e81df4ac9f0f599fc3c4f94e8d4a5f28d55dfee (patch)
treedec8a60750ba0eee1867b7934e47d9d90a60c2de /tests/auto/other/lancelot/scripts
parentaf867a516794ac27626f739aeb5743eb5e775a7a (diff)
Add testing of QPdfWriter output to QPainter lancelot test
Utilizes the native pdf renderer of macOS, so the test is only enabled on that platform. As the PDF generation should be platform independent anyway, this should not matter. Change-Id: I8b6b70562d1f24fdb77795aa7eb5843279aaae85 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 5e2725772aa25e0ee95269c8f996fdb7bc4705e7) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/auto/other/lancelot/scripts')
-rw-r--r--tests/auto/other/lancelot/scripts/cosmetic.qps55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/auto/other/lancelot/scripts/cosmetic.qps b/tests/auto/other/lancelot/scripts/cosmetic.qps
new file mode 100644
index 0000000000..3c730cf26f
--- /dev/null
+++ b/tests/auto/other/lancelot/scripts/cosmetic.qps
@@ -0,0 +1,55 @@
+drawRect 0 0 800 800
+
+setRenderHint Antialiasing true
+image_load dome_argb32.png img
+
+save
+setBrush springgreen SolidPattern
+
+begin_block primitives
+
+setPen black 2 DashLine
+pen_setCosmetic true
+drawLine 10 60 60 10
+drawRect 80 10.0 30 50
+drawText 130 50 "Foo"
+drawImage img 160 10 50 50
+
+pen_setCosmetic false
+drawLine 10 160 60 110
+drawRect 80 110.0 30 50
+drawText 130 150 "Foo"
+drawImage img 160 110 50 50
+
+setPen NoPen
+drawLine 10 260 60 210
+drawRect 80 210.0 30 50
+drawText 130 250 "Foo"
+drawImage img 160 210 50 50
+
+end_block primitives
+
+
+translate 250 0
+rotate 10
+scale 2.5 1
+repeat_block primitives
+
+resetMatrix
+# Force non-simple pen in Pdf
+setOpacity 0.5
+translate 0 400
+repeat_block primitives
+
+translate 250 0
+rotate 10
+scale 2.5 1
+repeat_block primitives
+
+restore
+setPen blue 4 DotLine
+setBrush olive SolidPattern
+pen_setCosmetic true
+translate 50 720
+scale 2 2
+drawRect 0 0 30 30