0025695: Visualization, AIS_InteractiveContext - define default HilightMode
[occt.git] / tests / v3d / materials / bug27818_1
1 puts "============"
2 puts "OCC27818_1"
3 puts "============"
4 puts ""
5 ####################################################################################
6 # Visualization - provide an interface to define highlight presentation properties:
7 # test change of highlight properties for whole interactive context
8 ####################################################################################
9
10
11 pload VISUALIZATION MODELING
12
13 box b 10 20 30
14 pcone p 15 0 40
15
16 vinit
17 vclear
18
19 vdisplay b -dispMode 1
20 vdisplay p -dispMode 1
21 vsetcolor b RED
22 vsetcolor p GREEN
23
24 vviewparams -scale 17.8 -proj 0.9 -0.3 0.3
25 vviewparams -up -0.2 0.4 0.9 -at 1.99 2.4 20.9
26 vviewparams -eye 56.1 -17.7 39.4
27
28 vselprops dynHighlight -transp 0.1 -color PALEGREEN2 -dispMode 1
29
30 vmoveto 167 263
31 set aPixelColor [vreadpixel 167 263 name rgba]
32 set aTransp [lindex [split $aPixelColor { }] 1]
33 if { $aTransp == 1 } {
34   puts "Error: highlighting of a cone is not transparent!"
35 }
36
37 vmoveto 285 212
38 set aPixelColor [vreadpixel 285 212 name rgba]
39 set aTransp [lindex [split $aPixelColor { }] 1]
40 if { $aTransp == 1 } {
41   puts "Error: highlighting of a box is not transparent!"
42 }
43
44 vdump $imagedir/${casename}.png