0029196: Tests - some test cases fail with Intel HD graphics
[occt.git] / tests / bugs / vis / bug26357
CommitLineData
539d3a1b 1puts "============"
7f83633f 2puts "0026357: Visualization - Panning zooms view if aspect ratio > 1"
539d3a1b 3puts "============"
4puts ""
5
539d3a1b 6box b 100 100 100
7
7f83633f 8vclear
539d3a1b 9vinit View1 w=400 h=400
10vinit View2 w=200 h=400
11vinit View3 w=400 h=200
539d3a1b 12
7f83633f 13vdisplay -dispMode 1 -highMode 1 b
539d3a1b 14
15# Test panning with aspect ratio 1:1
16vactivate View1
7f83633f 17vaxo
539d3a1b 18vfit
19vpan 200 0
20vmoveto 399 200
7f83633f 21if { [vreadpixel 399 200 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View1" }
539d3a1b 22vpan -200 0
23vmoveto 200 200
7f83633f 24if { [vreadpixel 200 200 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View1" }
539d3a1b 25vdump ${imagedir}/${casename}_1.png
26
27# Test panning with aspect ratio 1:2
28vactivate View2
7f83633f 29vaxo
539d3a1b 30vfit
31vpan 100 0
32vmoveto 199 100
7f83633f 33if { [vreadpixel 199 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View2" }
539d3a1b 34vpan -100 0
35vmoveto 100 100
7f83633f 36if { [vreadpixel 100 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View2" }
539d3a1b 37vdump ${imagedir}/${casename}_2.png
38
39# Test panning with aspect ratio 2:1
40vactivate View3
7f83633f 41vaxo
539d3a1b 42vfit
43vpan 200 0
44vmoveto 399 100
7f83633f 45if { [vreadpixel 399 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View3" }
539d3a1b 46vpan -200 0
47vmoveto 200 100
7f83633f 48if { [vreadpixel 200 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View3" }
539d3a1b 49vdump ${imagedir}/${casename}_3.png