Class RenderedImageCachableRed
- java.lang.Object
-
- org.apache.xmlgraphics.image.rendered.RenderedImageCachableRed
-
- All Implemented Interfaces:
RenderedImage,CachableRed
public class RenderedImageCachableRed extends Object implements 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: RenderedImageCachableRed.java 1732018 2016-02-24 04:51:06Z gadams $ Originally authored by Thomas DeWeese.
-
-
Constructor Summary
Constructors Constructor Description RenderedImageCachableRed(RenderedImage src)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WritableRastercopyData(WritableRaster raster)RectanglegetBounds()Returns the bounds of the current image.ColorModelgetColorModel()RastergetData()RastergetData(Rectangle rect)ShapegetDependencyRegion(int srcIndex, Rectangle outputRgn)Returns the region of input data is is required to generate outputRgn.ShapegetDirtyRegion(int srcIndex, Rectangle inputRgn)This calculates the region of output that is affected by a change in a region of input.intgetHeight()intgetMinTileX()intgetMinTileY()intgetMinX()intgetMinY()intgetNumXTiles()intgetNumYTiles()ObjectgetProperty(String name)String[]getPropertyNames()SampleModelgetSampleModel()VectorgetSources()RastergetTile(int tileX, int tileY)intgetTileGridXOffset()intgetTileGridYOffset()intgetTileHeight()intgetTileWidth()intgetWidth()static CachableRedwrap(RenderedImage ri)
-
-
-
Constructor Detail
-
RenderedImageCachableRed
public RenderedImageCachableRed(RenderedImage src)
-
-
Method Detail
-
wrap
public static CachableRed wrap(RenderedImage ri)
-
getSources
public Vector getSources()
- Specified by:
getSourcesin interfaceRenderedImage
-
getBounds
public Rectangle getBounds()
Description copied from interface:CachableRedReturns the bounds of the current image. This should be 'in sync' with getMinX, getMinY, getWidth, getHeight- Specified by:
getBoundsin interfaceCachableRed
-
getMinX
public int getMinX()
- Specified by:
getMinXin interfaceRenderedImage
-
getMinY
public int getMinY()
- Specified by:
getMinYin interfaceRenderedImage
-
getWidth
public int getWidth()
- Specified by:
getWidthin interfaceRenderedImage
-
getHeight
public int getHeight()
- Specified by:
getHeightin interfaceRenderedImage
-
getColorModel
public ColorModel getColorModel()
- Specified by:
getColorModelin interfaceRenderedImage
-
getSampleModel
public SampleModel getSampleModel()
- Specified by:
getSampleModelin interfaceRenderedImage
-
getMinTileX
public int getMinTileX()
- Specified by:
getMinTileXin interfaceRenderedImage
-
getMinTileY
public int getMinTileY()
- Specified by:
getMinTileYin interfaceRenderedImage
-
getNumXTiles
public int getNumXTiles()
- Specified by:
getNumXTilesin interfaceRenderedImage
-
getNumYTiles
public int getNumYTiles()
- Specified by:
getNumYTilesin interfaceRenderedImage
-
getTileGridXOffset
public int getTileGridXOffset()
- Specified by:
getTileGridXOffsetin interfaceRenderedImage
-
getTileGridYOffset
public int getTileGridYOffset()
- Specified by:
getTileGridYOffsetin interfaceRenderedImage
-
getTileWidth
public int getTileWidth()
- Specified by:
getTileWidthin interfaceRenderedImage
-
getTileHeight
public int getTileHeight()
- Specified by:
getTileHeightin interfaceRenderedImage
-
getProperty
public Object getProperty(String name)
- Specified by:
getPropertyin interfaceRenderedImage
-
getPropertyNames
public String[] getPropertyNames()
- Specified by:
getPropertyNamesin interfaceRenderedImage
-
getTile
public Raster getTile(int tileX, int tileY)
- Specified by:
getTilein interfaceRenderedImage
-
copyData
public WritableRaster copyData(WritableRaster raster)
- Specified by:
copyDatain interfaceRenderedImage
-
getData
public Raster getData()
- Specified by:
getDatain interfaceRenderedImage
-
getData
public Raster getData(Rectangle rect)
- Specified by:
getDatain interfaceRenderedImage
-
getDependencyRegion
public Shape getDependencyRegion(int srcIndex, Rectangle outputRgn)
Description copied from interface:CachableRedReturns the region of input data is is required to generate outputRgn.- Specified by:
getDependencyRegionin 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
public Shape getDirtyRegion(int srcIndex, Rectangle inputRgn)
Description copied from interface:CachableRedThis calculates the region of output that is affected by a change in a region of input.- Specified by:
getDirtyRegionin 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.
-
-