qt5base-lts/tests/baseline/painting/scripts/linedashes2.qps
Eirik Aavitsland e8f93e38de 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>
2021-11-16 14:01:50 +01:00

197 lines
3.0 KiB
Plaintext

# Version: 1
# CheckVsReference: 5% (0 0 800 800)
translate -30 10
setPen 0xffff0000 0 dashline squarecap
pen_setDashPattern [10 5]
save
translate 100 100
begin_block lines
drawLine 100 100 200 100
drawLine 100 100 200 200
drawLine 100 100 100 200
end_block
setPen 0xffff0000 2 dashline squarecap
translate 150 0
repeat_block lines
restore
save
save
begin_block horizontal
drawLine 0 0 50 0
drawLine 3 10 53 10
drawLine 6 20 56 20
drawLine 9 30 59 30
translate 0 50
drawLine 0 0 50 5
drawLine 3 10 53 15
drawLine 6 20 56 25
drawLine 9 30 59 35
translate 0 50
drawLine 0 0 50 -5
drawLine 3 10 53 5
drawLine 6 20 56 15
drawLine 9 30 59 25
end_block
restore
save
translate 80 0
repeat_block horizontal
restore
save
translate 800 0
repeat_block horizontal
restore
translate 180 -40
save
begin_block vertical
drawLine 0 0 0 50
drawLine 10 3 10 53
drawLine 20 6 20 56
drawLine 30 9 30 59
translate 50 0
drawLine 0 0 5 50
drawLine 10 3 15 53
drawLine 20 6 25 56
drawLine 30 9 35 59
translate 50 0
drawLine 0 0 -5 50
drawLine 10 3 5 53
drawLine 20 6 15 56
drawLine 30 9 25 59
end_block
restore
save
translate 0 80
repeat_block vertical
restore
translate 0 800
repeat_block vertical
restore
translate 0 200
setPen 0xffff0000 2 dashline squarecap
save
repeat_block horizontal
restore
save
translate 80 0
repeat_block horizontal
restore
save
translate 780 0
repeat_block horizontal
restore
translate 360 -240
save
repeat_block vertical
restore
save
translate 0 80
repeat_block vertical
restore
translate 0 780
repeat_block vertical
resetMatrix
translate 20 380
setPen 0xffff00ff 5 dashdotline flatcap
begin_block offset
pen_setDashPattern [1 1 4 1 1 4]
pen_setDashOffset -4
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset -2
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset 0
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset 2
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset 4
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset 6
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset 8
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset 10
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset 12
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset 14
drawLine 0 0 300 0
translate 0 8
pen_setDashOffset 16
drawLine 0 0 300 0
end_block offset
resetMatrix
translate 420 380
setPen 0xffff00ff 5 dashdotline roundcap
repeat_block offset
resetMatrix
setPen black 3 dashdotline
pen_setCosmetic true
translate 0 -150
drawLine 500 160 500 410
resetMatrix
translate 300 480
setPen blue 0
begin_block clip_lines
pen_setDashPattern [ 20 4 5 4 1 4 ]
pen_setDashOffset 26.0
drawLines [0 0 1000000 10 1000000 10 -1000000 20 -1000000 20 0 30]
end_block clip_lines
translate 0 45
setPen blue 5
repeat_block clip_lines
translate 0 45
setPen blue 5 SolidLine RoundCap
repeat_block clip_lines
translate 0 45
setPen green 0
begin_block clip_poly
pen_setDashPattern [ 20 4 5 4 1 4 ]
pen_setDashOffset 26.0
drawPolyline [0 0 1000000 10 -1000000 20 0 30]
end_block clip_poly
translate 0 45
setPen green 5
repeat_block clip_poly
translate 0 45
setPen green 5 SolidLine RoundCap
repeat_block clip_poly