NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
I have implemented offscreen rendering in Java2D, and image capture for both Java2D and Java3D. See examples/DisplayTest.java cases 50-52 for examples of how to code these functions. Note also that offscreen rendering is currently not possible with Java3D - but that capability is promised for Java3D version 1.2. The constructor: DisplayImplJ2D(String name, int width, int height) creates a DisplayImplJ2D for offscreen rendering. Note that its getComponent() returns null. The method: BufferedImage DisplayImpl.getImage() returns a BufferedImage captured from the display, for either Java2D or Java3D. You can read pixels from it, and use it to write image files. Good luck, and please let me know if you have any problems with these. Cheers, Bill ---------------------------------------------------------- Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706 whibbard@xxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738 http://www.ssec.wisc.edu/~billh/vis.html "kill cross-platform Java by growing the polluted Java market" - from an internal Microsoft planning document
visad
archives: