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