Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Alpha Blending?

Hi Kevin,

> Well, I have an array of Irregular2DSets.  I want to give each set a
> different color.  I then want to be able to toggle on and off the
> collection of Irregular2DSets at the same time.
>
> I'm sure that I can loop through the array of Iregular2DSets, and their
> associated DataReferences/DataRenderers and turn each one off
> individually, but I would like to do turn the array off and on in one
> step instead of a loop.  Is there a way to do this elegantly (i.e. w/o a
> loop)?  Is there and example?

Sure. Combine all your Sets in a FieldImpl with MathType
something like (index -> (r, g, b, Set(x, y))). Each Set
has a different color, and you can toggle the whole thing
on and off in one step.

Good luck,
Bill


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690