Class RenderedImageCachableRed
java.lang.Object
org.apache.xmlgraphics.image.rendered.RenderedImageCachableRed
- All Implemented Interfaces:
RenderedImage
,CachableRed
This implements CachableRed around a RenderedImage.
You can use this to wrap a RenderedImage that you want to
appear as a CachableRed.
It essentially ignores the dependency and dirty region methods.
- Version:
- $Id$ Originally authored by Thomas DeWeese.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyData
(WritableRaster raster) Returns the bounds of the current image.getData()
getDependencyRegion
(int srcIndex, Rectangle outputRgn) Returns the region of input data is is required to generate outputRgn.getDirtyRegion
(int srcIndex, Rectangle inputRgn) This calculates the region of output that is affected by a change in a region of input.int
int
int
int
getMinX()
int
getMinY()
int
int
getProperty
(String name) String[]
getTile
(int tileX, int tileY) int
int
int
int
int
getWidth()
static CachableRed
wrap
(RenderedImage ri)
-
Constructor Details
-
RenderedImageCachableRed
-
-
Method Details
-
wrap
-
getSources
- Specified by:
getSources
in interfaceRenderedImage
-
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
-
getMinX
public int getMinX()- Specified by:
getMinX
in interfaceRenderedImage
-
getMinY
public int getMinY()- Specified by:
getMinY
in interfaceRenderedImage
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfaceRenderedImage
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceRenderedImage
-
getColorModel
- Specified by:
getColorModel
in interfaceRenderedImage
-
getSampleModel
- Specified by:
getSampleModel
in interfaceRenderedImage
-
getMinTileX
public int getMinTileX()- Specified by:
getMinTileX
in interfaceRenderedImage
-
getMinTileY
public int getMinTileY()- Specified by:
getMinTileY
in interfaceRenderedImage
-
getNumXTiles
public int getNumXTiles()- Specified by:
getNumXTiles
in interfaceRenderedImage
-
getNumYTiles
public int getNumYTiles()- Specified by:
getNumYTiles
in interfaceRenderedImage
-
getTileGridXOffset
public int getTileGridXOffset()- Specified by:
getTileGridXOffset
in interfaceRenderedImage
-
getTileGridYOffset
public int getTileGridYOffset()- Specified by:
getTileGridYOffset
in interfaceRenderedImage
-
getTileWidth
public int getTileWidth()- Specified by:
getTileWidth
in interfaceRenderedImage
-
getTileHeight
public int getTileHeight()- Specified by:
getTileHeight
in interfaceRenderedImage
-
getProperty
- Specified by:
getProperty
in interfaceRenderedImage
-
getPropertyNames
- Specified by:
getPropertyNames
in interfaceRenderedImage
-
getTile
- Specified by:
getTile
in interfaceRenderedImage
-
copyData
- Specified by:
copyData
in interfaceRenderedImage
-
getData
- Specified by:
getData
in interfaceRenderedImage
-
getData
- Specified by:
getData
in interfaceRenderedImage
-
getDependencyRegion
Description copied from interface:CachableRed
Returns the region of input data is is required to generate outputRgn.- Specified by:
getDependencyRegion
in interfaceCachableRed
- Parameters:
srcIndex
- The source to do the dependency calculation for.outputRgn
- The region of output you are interested in generating dependencies for. The is given in the output pixel coordiate system for this node.- Returns:
- The region of input required. This is in the output pixel coordinate system for the source indicated by srcIndex.
-
getDirtyRegion
Description copied from interface:CachableRed
This calculates the region of output that is affected by a change in a region of input.- Specified by:
getDirtyRegion
in interfaceCachableRed
- Parameters:
srcIndex
- The input that inputRgn reflects changes in.inputRgn
- the region of input that has changed, used to calculate the returned shape. This is given in the pixel coordinate system of the source indicated by srcIndex.- Returns:
- The region of output that would be invalid given a change to inputRgn of the source selected by srcIndex. this is in the output pixel coordinate system of this node.
-