1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00
Files
occt/tests/bugs/vis/bug26404
tiv 293211aee0 0030592: Draw Harness, ViewerTest - provide vbackground command unifying vsetbg, vsetbgmode, vsetgradientbg, vsetgrbgmode, vsetcolorbg
A new command vbackground is created. Old background commands are made aliases for the newly created command (including vsetdefaultbg).
Tests are modified using newly added command vbackground.
2019-04-22 19:31:24 +03:00

28 lines
851 B
Plaintext

puts "========"
puts "OCC26404"
puts "========"
puts ""
###########################################################################################
# Visualization, Ray Tracing - use solid background color when gradient color is disabled
###########################################################################################
box b 1 2 3
vinit View1
vclear
vaxo
vsetdispmode 1
vbackground -color GRAY4
vdisplay b
vfit
vraytrace 1
set bug_info_1 [vreadpixel 50 50 rgb name]
if {$bug_info_1 != "GRAY4"} {
puts "ERROR: OCC26404 is reproduced. Background color is invalid (case #1)."
}
vbackground -gradient RED BLUE1 -gradientMode HORIZONTAL
vbackground -gradient RED BLUE1 -gradientMode NONE
set bug_info_2 [vreadpixel 50 50 rgb name]
if {$bug_info_2 != "GRAY4"} {
puts "ERROR: OCC26404 is reproduced. Background color is invalid (case #2)."
}