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

Home » Public Forums » archive » VERT_COLORS Problem
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: VERT_COLORS Problem [message #86637 is a reply to message #86631] Mon, 25 November 2013 06:00 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Udo Grabowski writes:

> I struggle with an animated tool that uses the "new style"
> surface function, and I'm trying to update the vert_colors
> option (which is tagged as updateable in the docs), but
> it does not work at all. What I'm doing wrong here ?
>
> ; boring flat grey semi-transparent surface
> ; (poor man's transparency, as always in IDL....)
> v = dist(10)
> rgba = intarr(4,100)
> rgba[0:*,0:*] = 110
> S = surface(v,vert_colors=rgba)
>
> ; update to light grey nearly transparent
> rgba[0:*,0:*] = 210
> S.vert_colors=rgba
> ; still the same boring grey !
>
> I tried several variants, setting vert_colors to 0,
> refresh, different sequences in doing that, using
> S->SetProperty,vert_colors=..., etc.etc.,
> no help, it seems that this is just an immutable
> variable and the documentation is wrong.

It would seem so, although I just tested this with my cgSurface program
and it would appear it is *possible* to change the vert_colors. In my
case, though, it is necessary to first turn the vert colors off, then on
again. In my test case, the code looks like this:

rgba = info.rgba
rgba[2,*] = 0
info.thisSurface -> SetProperty, Vert_Colors=0
info.thisSurface -> SetProperty, Vert_Colors=rgba

I did confirm this does NOT work with the Surface function though, so
something else is broken there.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Errorbar plot with max-min boundaries and bar plot with !P.Multi
Next Topic: IDL code - problem to convert string to float

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

Current Time: Fri Oct 10 15:16:26 PDT 2025

Total time taken to generate the page: 0.24274 seconds