Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Timo, If you are looking for a one-to-one correspondence between data samples and onscreen pixels, that is a bit tricky. However, fitting the data aspect to the shape of the display window is not as hard. You are not the first person to request such a feature in VisAD, so I added a method setAutoAspect(boolean auto) to DisplayImplJ2D. If you call setAutoAspect(true) on a DisplayImplJ2D object, the aspect will automatically adjust to fit the window every time the display panel changes size. The updated classes should be available on the FTP server within a few days. In the meantime, you can find the two relevant files at http://palm.ssec.wisc.edu/DisplayImplJ2D.java http://palm.ssec.wisc.edu/VisADCanvasJ2D.java Just put these two files in visad/java2d and recompile. Curtis At 06:42 11/14/00, you wrote: >Hi, > >I have (IMO) a very simple problem with the axis scaling in 2D-Displays. >Unfortunatly the manual couldn't help me much with it. The problem: > >How to set the aspect of an DisplayImpl2JD such that it covers an >rectangular area on the screen without strechting all pixels (which it >does if use ProjectionControl.setAspect())? At the moment the plot is >always a square even if I change the window size to a rectangle (the >Display automatically adjusts itself to the minimum of the width and >height). The perfect behaviour would be an automatic fitting to the >window size by covering the full available area. >Anybody out there who knows about that? > >Regards, >Timo >-- >__.__________ > |lmo |homas
visad
archives: