comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: how to make polygons created by idlgrpolygon transparent?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: how to make polygons created by idlgrpolygon transparent? [message #36222] Thu, 28 August 2003 10:52
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"seunghun lee" <shl@nist.gov> wrote in message
news:31b36665.0308280849.4f19b2ce@posting.google.com...
> is there a keyword in the idlgrpolygon command to make the object
transparent?
>

You can do it with a texture map.

Suppose that you wanted a translucent red polygon with 50% opacity:

; make a 2x2 RGBA texture
texture = BYTARR(4,2,2)
texture[0,*,*] = 255 ; red channel
texture[3,*,*] = 128 ; alpha channel
oTexture = OBJ_NEW('IDLgrImage', texture)
oPolygon->SetProperty, TEXTURE_MAP=oTexture, TEXTURE_COORD=FLTARR(2,nverts)

You have to supply texture coordinates, one per vertex. In this case, the
values of the texture coordinates do not really matter since all texels have
the same value, so 0.0 is fine.

Karl
[Message index]
 
Read Message
Previous Topic: Re: Code Metrics tools for IDL
Next Topic: Re: working with IDLtoAVI.dlm

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:38:33 PDT 2025

Total time taken to generate the page: 1.28042 seconds