NASA World Wind

gov.nasa.worldwind.data
Class BufferedImageRaster

java.lang.Object
  extended by gov.nasa.worldwind.data.BufferedImageRaster
All Implemented Interfaces:
Cacheable, DataRaster, Disposable
Direct Known Subclasses:
MipMappedBufferedImageRaster

public class BufferedImageRaster
extends Object
implements DataRaster, Cacheable, Disposable


Constructor Summary
BufferedImageRaster(int width, int height, int transparency, Sector sector)
           
BufferedImageRaster(Sector sector, BufferedImage bufferedImage)
           
 
Method Summary
protected  Rectangle computeClipRect(Sector clipSector, DataRaster clippedRaster)
           
protected  AffineTransform computeGeographicToRasterTransform(int width, int height, Sector sector)
           
protected  AffineTransform computeSourceToDestTransform(int sourceWidth, int sourceHeight, Sector sourceSector, int destWidth, int destHeight, Sector destSector)
           
static BufferedImage createCompatibleImage(int width, int height, int transparency)
           
 void dispose()
           
protected  void doDrawOnCanvas(BufferedImageRaster canvas, Sector clipSector)
           
 void drawOnCanvas(DataRaster canvas)
           
 void drawOnCanvas(DataRaster canvas, Sector clipSector)
           
 void fill(Color color)
           
 BufferedImage getBufferedImage()
           
protected static GraphicsConfiguration getDefaultGraphicsConfiguration()
           
 Graphics2D getGraphics()
           
 int getHeight()
           
 Sector getSector()
           
 long getSizeInBytes()
          Retrieves the approximate size of this object in bytes.
 int getWidth()
           
protected static boolean isCompatibleImage(BufferedImage image)
           
static BufferedImage toCompatibleImage(BufferedImage image)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedImageRaster

public BufferedImageRaster(int width,
                           int height,
                           int transparency,
                           Sector sector)

BufferedImageRaster

public BufferedImageRaster(Sector sector,
                           BufferedImage bufferedImage)
Method Detail

computeClipRect

protected Rectangle computeClipRect(Sector clipSector,
                                    DataRaster clippedRaster)

computeGeographicToRasterTransform

protected AffineTransform computeGeographicToRasterTransform(int width,
                                                             int height,
                                                             Sector sector)

computeSourceToDestTransform

protected AffineTransform computeSourceToDestTransform(int sourceWidth,
                                                       int sourceHeight,
                                                       Sector sourceSector,
                                                       int destWidth,
                                                       int destHeight,
                                                       Sector destSector)

createCompatibleImage

public static BufferedImage createCompatibleImage(int width,
                                                  int height,
                                                  int transparency)

dispose

public void dispose()
Specified by:
dispose in interface Disposable

doDrawOnCanvas

protected void doDrawOnCanvas(BufferedImageRaster canvas,
                              Sector clipSector)

drawOnCanvas

public void drawOnCanvas(DataRaster canvas)
Specified by:
drawOnCanvas in interface DataRaster

drawOnCanvas

public void drawOnCanvas(DataRaster canvas,
                         Sector clipSector)
Specified by:
drawOnCanvas in interface DataRaster

fill

public void fill(Color color)

getBufferedImage

public BufferedImage getBufferedImage()

getDefaultGraphicsConfiguration

protected static GraphicsConfiguration getDefaultGraphicsConfiguration()

getGraphics

public Graphics2D getGraphics()

getHeight

public int getHeight()
Specified by:
getHeight in interface DataRaster

getSector

public Sector getSector()
Specified by:
getSector in interface DataRaster

getSizeInBytes

public long getSizeInBytes()
Description copied from interface: Cacheable
Retrieves the approximate size of this object in bytes. Implementors are encouraged to calculate the exact size for smaller objects, but use approximate values for objects that include such large components that the approximation would produce an error so small that the extra computation would be wasteful.

Specified by:
getSizeInBytes in interface Cacheable
Returns:
this Cacheable object's size in bytes

getWidth

public int getWidth()
Specified by:
getWidth in interface DataRaster

isCompatibleImage

protected static boolean isCompatibleImage(BufferedImage image)

toCompatibleImage

public static BufferedImage toCompatibleImage(BufferedImage image)

NASA World Wind