qt5base-lts/tests/auto/other/lancelot/scripts/lines.qps
aavit 03967c4f0b Adjust autotest files for raster engine to new default pen
Fix those test scripts that assumed cosmetic default pen, and
improve testing coverage of cosmetic vs non-cosmetic pens in general.
Ref. I04d910e9700baf7f13a8aac07a3633014bb9283e

Change-Id: I2bb3525c21a8e9c8dd1f16e7dcd225195df43c1b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-26 11:53:12 +02:00

434 lines
8.5 KiB
Plaintext

# Version: 1
# CheckVsReference: 5% (0 0 310 425)
translate 10 10
begin_block draw_lines
save
translate 50 50
save
setPen 0x7fff0000
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
restore
# and then draw the lines the other direction
save
setPen 0x7f0000ff
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
rotate 10
drawLine 50 0 10 0
restore
# and now with a clip
save
setClipRect -30 -30 60 60
setPen 0x7f00ff00
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
rotate 10
drawLine 10 0 50 0
restore
restore
end_block
save
translate 100 0
scale 2 2
repeat_block draw_lines
restore
translate 0 10
save
translate 0 200
setRenderHint Antialiasing
repeat_block draw_lines
restore
save
translate 100 200
scale 2 2
setRenderHint Antialiasing
repeat_block draw_lines
restore
setPen 0x000000 8
translate 350 240
drawText 0 0 "Steep slopes:"
translate 0 10
drawLine 0 0 -8 400
translate 20 0
drawLine 0 0 -7 400
translate 20 0
drawLine 0 0 -6 400
translate 20 0
drawLine 0 0 -5 400
translate 20 0
drawLine 0 0 -4 400
translate 20 0
drawLine 0 0 -3 400
translate 20 0
drawLine 0 0 -2 400
translate 20 0
drawLine 0 0 -1 400
translate 20 0
drawLine 0 0 0 400
translate 20 0
drawLine 0 0 1 400
translate 20 0
drawLine 0 0 2 400
translate 20 0
drawLine 0 0 3 400
translate 20 0
drawLine 0 0 4 400
translate 20 0
drawLine 0 0 5 400
translate 20 0
drawLine 0 0 6 400
translate 20 0
drawLine 0 0 7 400
translate 20 0
drawLine 0 0 8 400
resetMatrix
translate 20 450
drawText 0 0 "Zero length lines:"
translate 0 20
drawText 100 10 "Square cap"
save
begin_block points
setPen 0x000000 1 solidline squarecap
drawLine 0 0 0 0
setPen 0x000000 2 solidline squarecap
drawLine 8 0 8 0
setPen 0x000000 3 solidline squarecap
drawLine 16 0 16 0
setPen 0x000000 4 solidline squarecap
drawLine 24 0 24 0
setPen 0x000000 5 solidline squarecap
drawLine 32 0 32 0
setPen 0x000000 6 solidline squarecap
drawLine 40 0 40 0
setPen 0x000000 7 solidline squarecap
drawLine 48 0 48 0
setPen 0x000000 8 solidline squarecap
drawLine 57 0 57 0
setPen 0x000000 9 solidline squarecap
drawLine 67 0 67 0
setPen 0x000000 10 solidline squarecap
drawLine 78 0 78 0
end_block points
restore
translate 0 12
setRenderHint Antialiasing off
repeat_block points
setRenderHint Antialiasing
translate 0 20
drawText 100 10 "Round cap"
save
begin_block points2
setPen 0x000000 1 solidline roundcap
drawLine 0 0 0 0
setPen 0x000000 2 solidline roundcap
drawLine 8 0 8 0
setPen 0x000000 3 solidline roundcap
drawLine 16 0 16 0
setPen 0x000000 4 solidline roundcap
drawLine 24 0 24 0
setPen 0x000000 5 solidline roundcap
drawLine 32 0 32 0
setPen 0x000000 6 solidline roundcap
drawLine 40 0 40 0
setPen 0x000000 7 solidline roundcap
drawLine 48 0 48 0
setPen 0x000000 8 solidline roundcap
drawLine 57 0 57 0
setPen 0x000000 9 solidline roundcap
drawLine 67 0 67 0
setPen 0x000000 10 solidline roundcap
drawLine 78 0 78 0
end_block points2
restore
translate 0 12
setRenderHint Antialiasing off
repeat_block points2
setRenderHint Antialiasing
translate 0 20
drawText 100 10 "Flat cap"
save
begin_block points3
setPen 0x000000 1 solidline flatcap
drawLine 0 0 0 0
setPen 0x000000 2 solidline flatcap
drawLine 8 0 8 0
setPen 0x000000 3 solidline flatcap
drawLine 16 0 16 0
setPen 0x000000 4 solidline flatcap
drawLine 24 0 24 0
setPen 0x000000 5 solidline flatcap
drawLine 32 0 32 0
setPen 0x000000 6 solidline flatcap
drawLine 40 0 40 0
setPen 0x000000 7 solidline flatcap
drawLine 48 0 48 0
setPen 0x000000 8 solidline flatcap
drawLine 57 0 57 0
setPen 0x000000 9 solidline flatcap
drawLine 67 0 67 0
setPen 0x000000 10 solidline flatcap
drawLine 78 0 78 0
end_block points3
restore
translate 0 12
setRenderHint Antialiasing off
repeat_block points3
resetMatrix
translate -220 667.226
drawText 230 -80 "Task 194266 (should see only one line):"
setPen black
drawRect 230.5 -70.5 122 12
setRenderHint Antialiasing
setPen red
drawLine 236.842105263 -63.775117299 247.368421053 -63.775437504
setRenderHint Antialiasing off
resetMatrix
translate 10 640
setPen black
drawText 0 -10 "Task 207147 (should see two lines):"
drawRect 0.5 0.5 64 64
setRenderHint Antialiasing
setPen red
drawLine 4.5 4.5 4.5001 60.5
drawLine 4.5 4.5 60.5 4.5001
setRenderHint Antialiasing off
resetMatrix
translate 10 730
setPen black
drawText 0 -10 "Task 229459 (should see one diagonal line):"
drawRect 0.5 0.5 64 64
setPen red 2 solidline flatcap
setClipRect 2 2 63 63
drawLine 1.5 1.5 33560000 33560000