I am confused of the vert_colors keyword of idlgrpolygon, I write a
test program like this :
PRO mypolygon_test
data = [[0,0],[1,0],[1,0.5],[1,1],[0,1],[0,0.5]]
polygons = [5,0,1,2,5,0,5,2,3,4,5,2]
color = [0,0,0]
vert_Colors = [[255,0,0], [0,0,255]]
mypolygon1 = obj_new('idlgrpolygon', style = 1, /depth_test_disable)
mypolygon2 = obj_new('idlgrpolygon', style = 2)
mypolygon1->SetProperty, Data = data, Polygons = polygons, color =
color
mypolygon2->SetProperty, Data = data, Polygons = polygons,
vert_Colors = vert_Colors
omodel = obj_new('idlgrmodel')
omodel->add, mypolygon2
omodel->add, mypolygon1
XOBJVIEW, omodel
; obj_destroy, omodel
END
What I want is a red rectangle with a blue rectangle up and down, but
the result is the color the mixed color of red and blue. So how can I
do this correctly? Thank you for any ideas.
cheers!
|