Re: Rubber band zoom

Hi Marco,

> I am looking for way to implement a rubberband zoom function for a 2D
> display. Unfortunately I have not found a solution.
> Any suggestions ?

You can create a 2-D display in Java3D using:

  new DisplayImplJ3D("display", new TwoDDisplayRendererJ3D())

Then you can create a
for a RealTuple in this display. See the main() method of
visad/bom/ for an example.
Note in the CellImpl of that example, you'd call something

  xmap.setRange(samples[0][0], samples[0][1]);
  ymap.setRange(samples[1][0], samples[1][1]);

where xmap and ymap are your ScalarMaps to XAxis and YAxis.
This would rescale the display to the bounds selected by
the rubber band box.

Good luck,

  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: