- To: visad-list@xxxxxxxxxxxxx
- Subject: Controlling colors when displaying UnionSets
- From: Edward Stanford <stanford@xxxxxxx>
- Date: Thu, 07 Dec 2000 16:50:33 -0500
How can one control the display color rendered on the screen from a
UnionSet? I have something like
// construct river system Gridded2DSet[] river_system = {river}; UnionSet rivers = new UnionSet(earth, river_system); // create a DataReference for river system final DataReference rivers_ref = new DataReferenceImpl("rivers"); rivers_ref.setData(rivers); // create a Display DisplayImpl display = new DisplayImplJ2D("image display"); // map earth coordinates to display coordinates ScalarMap longMap = new ScalarMap(RealType.Longitude, Display.XAxis); ScalarMap latMap = new ScalarMap(RealType.Latitude, Display.YAxis); display.addMap(longMap); display.addMap(latMap); // link the Display to rivers_ref display.addReference(rivers_ref);When I have run this code in the past, the river system has been drawn in white: today, it draws in black. Since I had always intended to grab control of the colors anyway, this seems like a good time.
Normally, I would hunt for the control on the relevant ScalarMap, which I would expect to look something like
ScalarMap map = new ScalarMap( tempType, Display.RGB);However, there isn't any mapping of the display type here: just the definitions of the axis.
Which brings me to a deeper question: since the above code only defines mappings for the XAxis and YAxis, why does anything appear at all?
Thanks in advance, Edward
- Follow-Ups:
- Re: Controlling colors when displaying UnionSets
- From: From: Bill Hibbard <hibbard@xxxxxxxxxxxxxxxxx>
- Re: Controlling colors when displaying UnionSets
- References:
- Running jar file gives error message
- From: Jesse Salb
- Re: Running jar file gives error message
- From: From: Bill Hibbard <hibbard@xxxxxxxxxxxxxxxxx>
- Running jar file gives error message