puts "============"
puts "CR24622"
puts "============"
puts ""

##############################################################################
#  Test for mapping Image_PixMap on AIS_TexturedShape / Graphic3d_TextureRoot
##############################################################################

set aV1 "Driver1/Viewer1/View1"
set aV2 "Driver1/Viewer2/View1"
vinit name=$aV1 l=32 t=32 w=400 h=400
vinit name=$aV2 l=32 t=32 w=400 h=400
vactivate $aV1
vclear

OCC24622 1D
vtop
vfit

set aColor [vreadpixel 100 200 rgb name]
if { "$aColor" != "CYAN1" } {
  puts "Error: the 1D texture color does not match at px (100, 200)!"
}

set aColor [vreadpixel 300 200 rgb name]
if { "$aColor" != "CHARTREUSE" } {
  puts "Error: the 1D texture color does not match at px (300, 200)!"
}

vactivate $aV2
vclear

OCC24622 2D
vtop
vfit

set aColor [vreadpixel 100 200 rgb name]
if { "$aColor" != "DARKGOLDENROD1" } {
  puts "Error: the 2D texture color does not match at px (200, 100)!"
}

set aColor [vreadpixel 200 300 rgb name]
if { "$aColor" != "CHARTREUSE" } {
  puts "Error: the 2D texture color does not match at px (200, 300)!"
}

checkview -screenshot -3d -path ${imagedir}/${test_image}.png
