From: Martin D. <mar...@te...> - 2003-05-02 12:43:13
|
Hello Ian Schneider a =E9crit: > Preliminary large grid / soft memory demo attached. >=20 > There are three classes: > Grid - encapsulate gridded data access > Grid.Tile - manage tiled subset of grid > Grid.TileReference - PhantomReference for pre-emptive tile caching > GridImageProducer - ImageProducer implementation > GridDisplay - cycles through modifying the entire grid, then displaying > (main class) Just took a look. Sound interresting. Some refactoring may help to=20 improve interoperability with J2SE imaging stuff, so that we can use it=20 with TileCache. Maybe a first step would be to make it work with=20 java.awt.image.Raster instead of Grid: * Call Raster.getDataBuffer(). * Check the DataBuffer type we got. There is many DataBuffer types, in a simular way than there is many NIO buffers. For example, if the databuffer is an instance of java.awt.image.DataBufferDouble, then we could call its getData() method (which returns double[]) and wrap the double[] array in java.nio.DoubleBuffer. Sound like that a bridge is possible that way. Actually (maybe I'm=20 missing the point), the bridge between various java.awt.image.DataBuffer=20 classes and corresponding java.nio.Buffer classes seems so obvious to me=20 that I would be a little bit surprised if there is not somebody (at Sun=20 or elswhere) already working on it... Martin. |