Class BufferedImageCachableRed
- java.lang.Object
-
- org.apache.xmlgraphics.image.rendered.AbstractRed
-
- org.apache.xmlgraphics.image.rendered.BufferedImageCachableRed
-
- All Implemented Interfaces:
java.awt.image.RenderedImage
,CachableRed
public class BufferedImageCachableRed extends AbstractRed
This implements CachableRed based on a BufferedImage. You can use this to wrap a BufferedImage that you want to appear as a CachableRed. It essentially ignores the dependency and dirty region methods. Originally authored by Thomas DeWeese.- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.awt.image.BufferedImage
bi
-
Fields inherited from class org.apache.xmlgraphics.image.rendered.AbstractRed
bounds, cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth
-
-
Constructor Summary
Constructors Constructor Description BufferedImageCachableRed(java.awt.image.BufferedImage bi)
Construct an instance of CachableRed around a BufferedImage.BufferedImageCachableRed(java.awt.image.BufferedImage bi, int xloc, int yloc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.WritableRaster
copyData(java.awt.image.WritableRaster wr)
java.awt.Rectangle
getBounds()
Returns the bounds of the current image.java.awt.image.BufferedImage
getBufferedImage()
fetch the bufferedImage from this node.java.awt.image.Raster
getData()
java.awt.image.Raster
getData(java.awt.Rectangle rect)
java.lang.Object
getProperty(java.lang.String name)
java.lang.String[]
getPropertyNames()
java.awt.image.Raster
getTile(int tileX, int tileY)
-
Methods inherited from class org.apache.xmlgraphics.image.rendered.AbstractRed
copyBand, copyToRaster, getColorModel, getDependencyRegion, getDirtyRegion, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getSampleModel, getSources, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth, getXTile, getYTile, init, init, makeTile, updateTileGridInfo
-
-
-
-
Method Detail
-
getBounds
public java.awt.Rectangle getBounds()
Description copied from interface:CachableRed
Returns the bounds of the current image. This should be 'in sync' with getMinX, getMinY, getWidth, getHeight- Specified by:
getBounds
in interfaceCachableRed
- Overrides:
getBounds
in classAbstractRed
-
getBufferedImage
public java.awt.image.BufferedImage getBufferedImage()
fetch the bufferedImage from this node.
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Specified by:
getProperty
in interfacejava.awt.image.RenderedImage
- Overrides:
getProperty
in classAbstractRed
-
getPropertyNames
public java.lang.String[] getPropertyNames()
- Specified by:
getPropertyNames
in interfacejava.awt.image.RenderedImage
- Overrides:
getPropertyNames
in classAbstractRed
-
getTile
public java.awt.image.Raster getTile(int tileX, int tileY)
- Specified by:
getTile
in interfacejava.awt.image.RenderedImage
- Overrides:
getTile
in classAbstractRed
-
getData
public java.awt.image.Raster getData()
- Specified by:
getData
in interfacejava.awt.image.RenderedImage
- Overrides:
getData
in classAbstractRed
-
getData
public java.awt.image.Raster getData(java.awt.Rectangle rect)
- Specified by:
getData
in interfacejava.awt.image.RenderedImage
- Overrides:
getData
in classAbstractRed
-
copyData
public java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster wr)
-
-