Hi Karl,
thanks for your code, it has been a lot of usefull.
But really i want something like the next code, but instead with a
texture map image i want use the vert_colors options. In the next code i
draw a texture map image with lines in the IDLgrSurface. If you change
the ";" to use vert_colors and ommit texture_map then the IDLgrSurface
is drawed without transparence.
i would like can specifie a level of transparence in the colors of
IDLgrSurface (if possible).
Thanks for your time.
Antonio
----------------------------------------------------------
pro test
img = BYTARR(4,2,2)
img[1,*,*] = 255 ; green
img[3,*,*] = 200 ; alpha
oTexture = OBJ_NEW('IDLgrImage', img, BLEND_FUNCTION=[3,4])
READ_JPEG, FILEPATH('rose.jpg', SUBDIR=['examples','data']), img, /TRUE
s = SIZE(img, /DIMENSIONS)
img2 = BYTARR(s[0]+1, s[1], s[2])
img2[0:2, *, *] = img
img2[3, *, *] = 100
oTexture2 = OBJ_NEW('IDLgrImage', img2, BLEND_FUNCTION=[3,4])
oSurface = OBJ_NEW('IDLgrSurface', DIST(45), $
COLOR=[255,255,255], STYLE=1, THICK=2, $
TEXTURE_MAP=oTexture2, TEXTURE_COORD=[[0,0],[1,0],[1,1],[0,1]])
;VERT_COLORS=[90,90,90,90, 150,150,150,150, 200,200,200,200])
oPolygon = OBJ_NEW('IDLgrPolygon', [0,1,1,0]*45, [0,0,1,1]*45, $
COLOR=[255,255,255], TEXTURE_MAP=oTexture, $
TEXTURE_COORD=[[0,0],[1,0],[1,1],[0,1]])
oModel = OBJ_NEW('IDLgrModel')
oModel->Add, [oPolygon, oSurface]
XOBJVIEW, oModel
end
|