Class PadRed
- java.lang.Object
-
- org.apache.batik.ext.awt.image.rendered.AbstractRed
-
- org.apache.batik.ext.awt.image.rendered.PadRed
-
- All Implemented Interfaces:
java.awt.image.RenderedImage,CachableRed
public class PadRed extends AbstractRed
This is an implementation of a Pad operation as a RenderedImage.- Version:
- $Id: PadRed.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classPadRed.ZeroRecterprotected static classPadRed.ZeroRecter_INT_PACK
-
Field Summary
Fields Modifier and Type Field Description (package private) static booleanDEBUG(package private) java.awt.RenderingHintshints(package private) PadModepadMode-
Fields inherited from class org.apache.batik.ext.awt.image.rendered.AbstractRed
bounds, cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth
-
-
Constructor Summary
Constructors Constructor Description PadRed(CachableRed src, java.awt.Rectangle bounds, PadMode padMode, java.awt.RenderingHints hints)Construct A Rendered Pad operation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.WritableRastercopyData(java.awt.image.WritableRaster wr)protected static java.awt.image.SampleModelfixSampleModel(CachableRed src, java.awt.Rectangle bounds)This function 'fixes' the source's sample model.protected voidhandleReplicate(java.awt.image.WritableRaster wr)protected voidhandleWrap(java.awt.image.WritableRaster wr)protected voidhandleZero(java.awt.image.WritableRaster wr)-
Methods inherited from class org.apache.batik.ext.awt.image.rendered.AbstractRed
copyBand, copyToRaster, getBounds, getColorModel, getData, getData, getDependencyRegion, getDirtyRegion, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getPropertyNames, getSampleModel, getSources, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth, getXTile, getYTile, init, init, makeTile, updateTileGridInfo
-
-
-
-
Field Detail
-
DEBUG
static final boolean DEBUG
- See Also:
- Constant Field Values
-
padMode
PadMode padMode
-
hints
java.awt.RenderingHints hints
-
-
Constructor Detail
-
PadRed
public PadRed(CachableRed src, java.awt.Rectangle bounds, PadMode padMode, java.awt.RenderingHints hints)
Construct A Rendered Pad operation. If the pad is smaller than the original image size then this devolves to a Crop.- Parameters:
src- The image to pad/cropbounds- The bounds of the result (same coord system as src).padMode- The pad mode to use (currently ignored).hints- The hints to use for drawing 'pad' area.
-
-
Method Detail
-
copyData
public java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster wr)
-
handleZero
protected void handleZero(java.awt.image.WritableRaster wr)
-
handleReplicate
protected void handleReplicate(java.awt.image.WritableRaster wr)
-
handleWrap
protected void handleWrap(java.awt.image.WritableRaster wr)
-
fixSampleModel
protected static java.awt.image.SampleModel fixSampleModel(CachableRed src, java.awt.Rectangle bounds)
This function 'fixes' the source's sample model. right now it just ensures that the sample model isn't much larger than my width.
-
-