1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
ski ccadc126ba 0023493: Incorrect QAGetPixelColor usage
Usage of QAGetPixelColor were checked and corrected.

Using simple comparison instead of regexp.

Improved usage of command vreadpixel for standard colors.

Command QAGetPixelColor was dropped from TKQADraw.

Procedures "checkcolor" and auxiliary "checkpoint" were moved to DrawResources/TestCommands.tcl

Some test cases using "checkcolor" for picking line color were simplified.

Procedures checkcolor and checkpoint were changed to handle situation when pixel is out of view.

Removed unnecessary use of command "vaspects -setwidth" in tests.

Revert -setwidth change in test bugs/vis/bug23525
2014-12-11 16:48:05 +03:00

39 lines
857 B
Plaintext
Executable File

pload QAcommands
puts "================"
puts "OCC22039"
puts "================"
puts ""
#######################################################################################
# Incorrect interactive detection (highlights) of elements
######################################################################################
set BugNumber OCC22039
restore [locate_data_file OCC12121-CrankArm.brep] result
vinit
vsetdispmode 1
vdisplay result
vfit
###set x1 101
set x1 102
set y1 199
set Color [vreadpixel ${x1} ${y1} rgb]
vmoveto ${x1} ${y1}
set ColorMove [vreadpixel ${x1} ${y1} rgb]
vselect ${x1} ${y1}
set ColorSelect [vreadpixel ${x1} ${y1} rgb]
if { ${Color} != ${ColorMove} && ${Color} != ${ColorSelect} && ${ColorMove} != ${ColorSelect} } {
puts "OK ${BugNumber}"
} else {
puts "Faulty ${BugNumber}"
}
set square 24859.6
set only_screen 1