Class RenderedImageCachableRed
- java.lang.Object
-
- org.apache.batik.ext.awt.image.rendered.RenderedImageCachableRed
-
- All Implemented Interfaces:
java.awt.image.RenderedImage,CachableRed
public class RenderedImageCachableRed extends java.lang.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 1733416 2016-03-03 07:07:13Z gadams $
-
-
Constructor Summary
Constructors Constructor Description RenderedImageCachableRed(java.awt.image.RenderedImage src)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.WritableRastercopyData(java.awt.image.WritableRaster raster)java.awt.RectanglegetBounds()Returns the bounds of the current image.java.awt.image.ColorModelgetColorModel()java.awt.image.RastergetData()java.awt.image.RastergetData(java.awt.Rectangle rect)java.awt.ShapegetDependencyRegion(int srcIndex, java.awt.Rectangle outputRgn)Returns the region of input data is is required to generate outputRgn.java.awt.ShapegetDirtyRegion(int srcIndex, java.awt.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()java.lang.ObjectgetProperty(java.lang.String name)java.lang.String[]getPropertyNames()java.awt.image.SampleModelgetSampleModel()java.util.VectorgetSources()java.awt.image.RastergetTile(int tileX, int tileY)intgetTileGridXOffset()intgetTileGridYOffset()intgetTileHeight()intgetTileWidth()intgetWidth()static CachableRedwrap(java.awt.image.RenderedImage ri)
-
-
-
Method Detail
-
wrap
public static CachableRed wrap(java.awt.image.RenderedImage ri)
-
getSources
public java.util.Vector getSources()
- Specified by:
getSourcesin interfacejava.awt.image.RenderedImage
-
getBounds
public java.awt.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 interfacejava.awt.image.RenderedImage
-
getMinY
public int getMinY()
- Specified by:
getMinYin interfacejava.awt.image.RenderedImage
-
getWidth
public int getWidth()
- Specified by:
getWidthin interfacejava.awt.image.RenderedImage
-
getHeight
public int getHeight()
- Specified by:
getHeightin interfacejava.awt.image.RenderedImage
-
getColorModel
public java.awt.image.ColorModel getColorModel()
- Specified by:
getColorModelin interfacejava.awt.image.RenderedImage
-
getSampleModel
public java.awt.image.SampleModel getSampleModel()
- Specified by:
getSampleModelin interfacejava.awt.image.RenderedImage
-
getMinTileX
public int getMinTileX()
- Specified by:
getMinTileXin interfacejava.awt.image.RenderedImage
-
getMinTileY
public int getMinTileY()
- Specified by:
getMinTileYin interfacejava.awt.image.RenderedImage
-
getNumXTiles
public int getNumXTiles()
- Specified by:
getNumXTilesin interfacejava.awt.image.RenderedImage
-
getNumYTiles
public int getNumYTiles()
- Specified by:
getNumYTilesin interfacejava.awt.image.RenderedImage
-
getTileGridXOffset
public int getTileGridXOffset()
- Specified by:
getTileGridXOffsetin interfacejava.awt.image.RenderedImage
-
getTileGridYOffset
public int getTileGridYOffset()
- Specified by:
getTileGridYOffsetin interfacejava.awt.image.RenderedImage
-
getTileWidth
public int getTileWidth()
- Specified by:
getTileWidthin interfacejava.awt.image.RenderedImage
-
getTileHeight
public int getTileHeight()
- Specified by:
getTileHeightin interfacejava.awt.image.RenderedImage
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Specified by:
getPropertyin interfacejava.awt.image.RenderedImage
-
getPropertyNames
public java.lang.String[] getPropertyNames()
- Specified by:
getPropertyNamesin interfacejava.awt.image.RenderedImage
-
getTile
public java.awt.image.Raster getTile(int tileX, int tileY)- Specified by:
getTilein interfacejava.awt.image.RenderedImage
-
copyData
public java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster raster)
- Specified by:
copyDatain interfacejava.awt.image.RenderedImage
-
getData
public java.awt.image.Raster getData()
- Specified by:
getDatain interfacejava.awt.image.RenderedImage
-
getData
public java.awt.image.Raster getData(java.awt.Rectangle rect)
- Specified by:
getDatain interfacejava.awt.image.RenderedImage
-
getDependencyRegion
public java.awt.Shape getDependencyRegion(int srcIndex, java.awt.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 java.awt.Shape getDirtyRegion(int srcIndex, java.awt.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.
-
-