|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.PlanarImage | +--javax.media.jai.OpImage | +--javax.media.jai.GeometricOpImage | +--javax.media.jai.WarpOpImage
A general implementation of image warping, and a superclass for specific image warping operations.
The image warp is specified by a Warp
object
and an Interpolation
object.
Subclasses of WarpOpImage
may choose whether they
wish to implement the cobbled or non-cobbled variant of
computeRect
by means of the cobbleSources
constructor parameter. The class comments for OpImage
provide more information about how to override
computeRect
.
OpImage
,
Warp
,
Interpolation
Field Summary | |
protected Warp |
warp
The Warp object describing the backwards pixel
map. |
Fields inherited from class javax.media.jai.GeometricOpImage |
computableBounds,
extender,
interp |
Fields inherited from class javax.media.jai.OpImage |
cache,
cobbleSources,
OP_COMPUTE_BOUND,
OP_IO_BOUND,
OP_NETWORK_BOUND,
tileCacheMetric |
Fields inherited from class javax.media.jai.PlanarImage |
colorModel,
eventManager,
height,
minX,
minY,
properties,
sampleModel,
tileGridXOffset,
tileGridYOffset,
tileHeight,
tileWidth,
width |
Constructor Summary | |
WarpOpImage(RenderedImage source,
ImageLayout layout,
Map configuration,
boolean cobbleSources,
BorderExtender extender,
Interpolation interp,
Warp warp)
Constructor. |
Method Summary | |
protected Rectangle |
backwardMapRect(Rectangle destRect,
int sourceIndex)
Returns the minimum bounding box of the region of the specified source to which a particular Rectangle of the
destination will be mapped. |
Raster |
computeTile(int tileX,
int tileY)
Computes a tile. |
protected Rectangle |
forwardMapRect(Rectangle sourceRect,
int sourceIndex)
Returns the minimum bounding box of the region of the destination to which a particular Rectangle of the specified source
will be mapped. |
int |
getBottomPadding()
Deprecated. as of JAI 1.1. |
int |
getLeftPadding()
Deprecated. as of JAI 1.1. |
int |
getRightPadding()
Deprecated. as of JAI 1.1. |
int |
getTopPadding()
Deprecated. as of JAI 1.1. |
Methods inherited from class javax.media.jai.GeometricOpImage |
getBorderExtender,
getInterpolation,
mapDestRect,
mapSourceRect |
Methods inherited from class javax.media.jai.OpImage |
addTileToCache,
cancelTiles,
computeRect,
computeRect,
computesUniqueTiles,
finalize,
getExpandedNumBands,
getFormatTags,
getOperationComputeType,
getTile,
getTileCache,
getTileCacheMetric,
getTileDependencies,
getTileFromCache,
getTiles,
hasExtender,
prefetchTiles,
queueTiles,
setTileCache,
vectorize,
vectorize,
vectorize |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected Warp warp
Warp
object describing the backwards pixel
map. It can not be null
.Constructor Detail |
public WarpOpImage(RenderedImage source, ImageLayout layout, Map configuration, boolean cobbleSources, BorderExtender extender, Interpolation interp, Warp warp)
The image's layout is encapsulated in the layout
argument. The user-supplied layout values supersedes the default
settings. Any layout setting not specified by the user will take
the corresponding value of the source image's layout.
layout
- The layout of this image.source
- The source image; can not be null
.configuration
- Configurable attributes of the image including
configuration variables indexed by
RenderingHints.Key
s and image properties indexed
by String
s or CaselessStringKey
s.
This is simply forwarded to the superclass constructor.cobbleSources
- A boolean
indicating whether
computeRect()
expects contiguous sources.
To use the default implementation of warping contained in
this class, set cobbleSources
to false
.extender
- A BorderExtender, or null.interp
- The Interpolation
object describing the
interpolation method.warp
- The Warp
object describing the warp.source
is null
.warp
is
null
.Method Detail |
public int getLeftPadding()
public int getRightPadding()
public int getTopPadding()
public int getBottomPadding()
protected Rectangle forwardMapRect(Rectangle sourceRect, int sourceIndex)
Rectangle
of the specified source
will be mapped.sourceRect
- the Rectangle
in source coordinates.sourceIndex
- the index of the source image.Rectangle
indicating the destination
bounding box, or null
if the bounding box
is unknown.sourceIndex
is
negative or greater than the index of the last source.sourceRect
is
null
.protected Rectangle backwardMapRect(Rectangle destRect, int sourceIndex)
Rectangle
of the
destination will be mapped.destRect
- the Rectangle
in destination coordinates.sourceIndex
- the index of the source image.Rectangle
indicating the source bounding box,
or null
if the bounding box is unknown.sourceIndex
is
negative or greater than the index of the last source.destRect
is
null
.public Raster computeTile(int tileX, int tileY)
WritableRaster
is created to
represent the requested tile. Its width and height equals to this
image's tile width and tile height respectively. This method
assumes that the requested tile either intersects or is within
the bounds of this image.
Whether or not this method performs source cobbling is determined
by the cobbleSources
variable set at construction time.
If cobbleSources
is true
, cobbling is
performed on the source for areas that intersect multiple tiles,
and computeRect(Raster[], WritableRaster, Rectangle)
is called to perform the actual computation. Otherwise,
computeRect(PlanarImage[], WritableRaster, Rectangle)
is called to perform the actual computation.
tileX
- The X index of the tile.tileY
- The Y index of the tile.Raster
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |