d5514578 |
1 | puts "============" |
61f73653 |
2 | puts "0027573: AIS_ColorScale::FindColor does not take into account custom colors." |
d5514578 |
3 | puts "============" |
4 | puts "" |
5 | |
6 | vclose all |
61f73653 |
7 | vinit View1 |
d5514578 |
8 | vclear |
9 | vaxo |
10 | |
11 | vcolorscale cs -demo |
12 | vcolorscale cs -range 0 20 5 |
13 | |
14 | # Set user-defined colors and labels for color scale |
aaf8d6a9 |
15 | vcolorscale cs -colors white red green BLUE gray |
61f73653 |
16 | vdump ${imagedir}/${casename}_pos.png |
d5514578 |
17 | |
61f73653 |
18 | if {[vcolorscale cs -findcolor 0] != "WHITE"} { puts "ERROR: wrong 1st segment сolor" } |
19 | if {[vcolorscale cs -findcolor 4] != "RED"} { puts "ERROR: wrong color on border between 1st and 2nd segments" } |
20 | if {[vcolorscale cs -findcolor 5] != "RED"} { puts "ERROR: wrong 2nd segment color" } |
21 | if {[vcolorscale cs -findcolor 9] != "GREEN"} { puts "ERROR: wrong 3rd segment color" } |
22 | if {[vcolorscale cs -findcolor 20] != "GRAY"} { puts "ERROR: wrong last segment color at border" } |
d5514578 |
23 | |
24 | # Check negative value limits |
25 | vcolorscale cs -range -5 5 5 |
61f73653 |
26 | vdump ${imagedir}/${casename}_neg.png |
d5514578 |
27 | |
61f73653 |
28 | if {[vcolorscale cs -findcolor -5] != "WHITE"} { puts "ERROR: wrong first segment color" } |
29 | if {[vcolorscale cs -findcolor 0] != "GREEN"} { puts "ERROR: wrong middle segment color" } |
30 | if {[vcolorscale cs -findcolor 5] != "GRAY"} { puts "ERROR: wrong last segment color" } |