1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00
occt/tests/bugs/vis/bug23012
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

41 lines
817 B
Plaintext
Executable File

puts "================"
puts "OCC23012"
puts "================"
puts ""
#######################################################################################
# Detection gives incorrect results
######################################################################################
set BugNumber OCC23012
catch {pload XDE}
set x1 210
set y1 184
set x2 205
set y2 180
stepread [locate_data_file OCC23012-Sample_3.stp] a *
stepread [locate_data_file OCC23012-Sample_9.stp] b *
vdisplay a_1 b_1
vsetdispmode a_1 1
vsetdispmode b_1 1
vselprecision
vselprecision 1 0.1
set ColorBefore [vreadpixel ${x1} ${y1} rgb]
vmoveto ${x2} ${y2}
set ColorAfter [vreadpixel ${x2} ${y2} rgb]
if { "$ColorBefore" == "$ColorAfter" } {
puts "OK ${BugNumber}"
} else {
puts "Faulty ${BugNumber}"
}
vfit
set only_screen 1