1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-26 10:19:45 +03:00
occt/tests/bugs/vis/bug7186
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

55 lines
1.1 KiB
Plaintext
Executable File

puts "============"
puts "OCC7186"
puts "============"
puts ""
######################################################
# Selecting an empty space with rectangle doesn't clear
# the current selection, when there is an opened local context
######################################################
set BugNumber OCC7186
set mistake 0
box b 10 10 10
vinit
vdisplay b
vfit
vselmode 2 1
vselect 1 1 407 407
set NbSelected1 [vnbselected]
if { ${NbSelected1} != 12 } {
puts "Bad number of selected edges after rectangle selection all edges"
set mistake 1
}
vselect 10 10 20 20
set NbSelected2 [vnbselected]
if { ${NbSelected2} != 0 } {
puts "Error : Bad number of selected edges after rectangle selection an empty space"
set mistake 1
}
set x [list 125 204 283 29 111 298 379 125 204 283 125 283]
set y [list 47 100 47 200 150 150 200 250 300 250 361 361]
vaspects -setwidth 5
puts ""
for {set i 0} {$i < 12} {incr i} {
if { [vreadpixel [lindex ${x} $i] [lindex ${y} $i] rgb name] != "YELLOW" } {
set mistake 1
}
}
puts ""
if { ${mistake} == 1 } {
puts "${BugNumber}: Faulty"
} else {
puts "${BugNumber}: OK"
}
set only_screen 1