1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/v3d/materials/bug27818_2
mkrylova e3d4b87912 0031779: Visualization, AIS_ViewController - controller should handle selection schemes
Added AIS_ViewController::MouseSelectionSchemes() property defining map of selection schemes for mouse+modifier combinations.
IsXOR flag has been replaced by AIS_SelectionScheme in interfaces.

Rubber-band selection with Shift key pressed now applies XOR selection scheme in in Draw Harness.
Command vselect has been extended to specify selection scheme by name.
2021-03-04 19:43:13 +03:00

37 lines
1.1 KiB
Plaintext

puts "============"
puts "OCC27818_2"
puts "============"
puts ""
####################################################################################
# Visualization - provide an interface to define highlight presentation properties:
# test change of highlight and selection properties for particular objects
####################################################################################
pload QAcommands VISUALIZATION
vinit
OCC27818
vfit
vmoveto 200 200
set aPixelColor [vreadpixel 200 200 name rgba]
set aColor [lindex [split $aPixelColor { }] 0]
set aTrsp [lindex [split $aPixelColor { }] 1]
if {$aColor != "CHOCOLATE3" && abs($aTrsp - 1.0) < 0.1} {
puts "ERROR: dynamic highlight of 2nd box is displayed with wrong color!"
}
vdump $imagedir/${casename}_dyn.png
vselect 50 200 -xor
vselect 200 200 -xor
vselect 350 200 -xor
if {[vreadpixel 350 200 name rgba] != "RED2 1" || [vreadpixel 350 200 name rgba] == [vreadpixel 200 200 name rgba]} {
puts "ERROR: selection highlight of 3rd box is displayed with wrong color!"
}
vdump $imagedir/${casename}_sel.png