f0cddd16 |
1 | puts "===========" |
0d828ac8 |
2 | puts "OCC27530: Visualization - AIS_InteractiveContext::HilightNextDetected() doesn't work in Neutral Point" |
f0cddd16 |
3 | puts "===========" |
4 | puts "" |
f0cddd16 |
5 | |
6 | proc check_highlighting { theHiBoxIdx theCoords } { |
7 | set aNext [expr ($theHiBoxIdx + 1) % 3] |
8 | set aNextNext [expr ($theHiBoxIdx + 2) % 3] |
9 | set hiColor [vreadpixel [lindex $theCoords [expr $theHiBoxIdx * 2] ] [lindex $theCoords [expr $theHiBoxIdx * 2 + 1] ] name] |
10 | set nextColor [vreadpixel [lindex $theCoords [expr $aNext * 2] ] [lindex $theCoords [expr $aNext * 2 + 1] ] name] |
11 | set nextNextColor [vreadpixel [lindex $theCoords [expr $aNextNext * 2] ] [lindex $theCoords [expr $aNextNext * 2 + 1] ] name] |
12 | |
aaf8d6a9 |
13 | if {$hiColor == "CYAN 1" && $nextColor == "YELLOW 1" && $nextNextColor == "YELLOW 1"} { |
f0cddd16 |
14 | return true |
15 | } else { |
16 | return false |
17 | } |
18 | } |
19 | |
20 | pload VISUALIZATION MODELING |
21 | |
22 | box b0 3 3 3 |
23 | box b1 1 1 1 3 2 1 |
24 | box b2 1.5 1.5 1.5 4 4 4 |
25 | |
26 | set coords { } |
27 | # b0_x, b0_y |
28 | lappend coords 355 |
29 | lappend coords 186 |
30 | # b1_x, b1_y |
31 | lappend coords 266 |
32 | lappend coords 333 |
33 | # b2_x, b2_y |
34 | lappend coords 177 |
35 | lappend coords 2 |
36 | |
0d828ac8 |
37 | vinit View1 |
f0cddd16 |
38 | vclear |
39 | vdisplay b0 b1 b2 |
40 | vleft |
41 | vfit |
42 | |
43 | # MoveTo in area that is common for all boxes |
44 | vmoveto 210 280 |
45 | |
46 | if { ![check_highlighting 0 $coords] } { |
47 | puts "ERROR: incorrect highlighting of box b0" |
48 | } |
49 | |
50 | # check vselnext |
51 | vselnext |
52 | if { ![check_highlighting 1 $coords] } { |
53 | puts "ERROR: incorrect highlighting of box b1 after vselnext call" |
54 | } |
55 | vselnext |
56 | if { ![check_highlighting 2 $coords] } { |
57 | puts "ERROR: incorrect highlighting of box b2 after vselnext call" |
58 | } |
59 | vselnext |
60 | if { ![check_highlighting 0 $coords] } { |
61 | puts "ERROR: incorrect highlighting of box b0 after vselnext call" |
62 | } |
63 | |
64 | # check vselprev |
65 | vselprev |
66 | if { ![check_highlighting 2 $coords] } { |
67 | puts "ERROR: incorrect highlighting of box b2 after vselprev call" |
68 | } |
69 | vselprev |
70 | if { ![check_highlighting 1 $coords] } { |
71 | puts "ERROR: incorrect highlighting of box b1 after vselprev call" |
72 | } |
73 | vselprev |
74 | if { ![check_highlighting 0 $coords] } { |
75 | puts "ERROR: incorrect highlighting of box b0 after vselprev call" |
76 | } |
0d828ac8 |
77 | vdump ${imagedir}/${casename}.png |