Class TileRable8Bit
- java.lang.Object
-
- org.apache.batik.ext.awt.image.renderable.AbstractRable
-
- org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
-
- org.apache.batik.ext.awt.image.renderable.TileRable8Bit
-
- All Implemented Interfaces:
java.awt.image.renderable.RenderableImage
,Filter
,FilterColorInterpolation
,TileRable
public class TileRable8Bit extends AbstractColorInterpolationRable implements TileRable
8 bit TileRable implementation- Version:
- $Id: TileRable8Bit.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
overflow
Controls whether the tileRegion clips the source or notprivate java.awt.geom.Rectangle2D
tiledRegion
Tiled regionprivate java.awt.geom.Rectangle2D
tileRegion
Tile region-
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
csLinear
-
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
props, srcs, stamp
-
-
Constructor Summary
Constructors Constructor Description TileRable8Bit(Filter source, java.awt.geom.Rectangle2D tiledRegion, java.awt.geom.Rectangle2D tileRegion, boolean overflow)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.RenderedImage
createRendering(java.awt.image.renderable.RenderContext rc)
java.awt.image.RenderedImage
createTile(java.awt.image.renderable.RenderContext rc)
Computes the tile to use for the tiling operation.java.awt.geom.Rectangle2D
getActualTileBounds(java.awt.geom.Rectangle2D tiledRect)
java.awt.geom.Rectangle2D
getBounds2D()
Returns this filter's boundsFilter
getSource()
Return's the tile sourcejava.awt.geom.Rectangle2D
getTiledRegion()
Returns the tiled regionjava.awt.geom.Rectangle2D
getTileRegion()
Returns the tile regionboolean
isOverflow()
Returns the overflow strategyvoid
setOverflow(boolean overflow)
Sets the overflow strategyvoid
setSource(Filter src)
Sets the filter sourcevoid
setTiledRegion(java.awt.geom.Rectangle2D tiledRegion)
Sets the tiled regionvoid
setTileRegion(java.awt.geom.Rectangle2D tileRegion)
Sets the tile region-
Methods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
convertSourceCS, convertSourceCS, getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
-
Methods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
createDefaultRendering, createScaledRendering, getDependencyRegion, getDirtyRegion, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getTimeStamp, getWidth, init, init, init, init, isDynamic, touch
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.batik.ext.awt.image.renderable.Filter
getDependencyRegion, getDirtyRegion, getTimeStamp
-
Methods inherited from interface org.apache.batik.ext.awt.image.renderable.FilterColorInterpolation
getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
-
-
-
-
Constructor Detail
-
TileRable8Bit
public TileRable8Bit(Filter source, java.awt.geom.Rectangle2D tiledRegion, java.awt.geom.Rectangle2D tileRegion, boolean overflow)
Default constructor
-
-
Method Detail
-
getTileRegion
public java.awt.geom.Rectangle2D getTileRegion()
Returns the tile region- Specified by:
getTileRegion
in interfaceTileRable
-
setTileRegion
public void setTileRegion(java.awt.geom.Rectangle2D tileRegion)
Sets the tile region- Specified by:
setTileRegion
in interfaceTileRable
-
getTiledRegion
public java.awt.geom.Rectangle2D getTiledRegion()
Returns the tiled region- Specified by:
getTiledRegion
in interfaceTileRable
-
setTiledRegion
public void setTiledRegion(java.awt.geom.Rectangle2D tiledRegion)
Sets the tiled region- Specified by:
setTiledRegion
in interfaceTileRable
-
isOverflow
public boolean isOverflow()
Returns the overflow strategy- Specified by:
isOverflow
in interfaceTileRable
-
setOverflow
public void setOverflow(boolean overflow)
Sets the overflow strategy- Specified by:
setOverflow
in interfaceTileRable
-
setSource
public void setSource(Filter src)
Sets the filter source
-
getSource
public Filter getSource()
Return's the tile source
-
getBounds2D
public java.awt.geom.Rectangle2D getBounds2D()
Returns this filter's bounds- Specified by:
getBounds2D
in interfaceFilter
- Overrides:
getBounds2D
in classAbstractRable
-
createRendering
public java.awt.image.RenderedImage createRendering(java.awt.image.renderable.RenderContext rc)
- Specified by:
createRendering
in interfacejava.awt.image.renderable.RenderableImage
-
getActualTileBounds
public java.awt.geom.Rectangle2D getActualTileBounds(java.awt.geom.Rectangle2D tiledRect)
-
createTile
public java.awt.image.RenderedImage createTile(java.awt.image.renderable.RenderContext rc)
Computes the tile to use for the tiling operation. The tile has its origin in the upper left corner of the tiled region. That tile is separated into 4 areas: top-left, top-right, bottom-left and bottom-right. Each of these areas is mapped to some input area from the source. If the source is smaller than the tiled area, then a single rendering is requested from the source. If the source's width or height is bigger than that of the tiled area, then separate renderings are requested from the source.
-
-