|
|||||||||
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.SourcelessOpImage
An abstract base class for image operators that have no image sources.
SourcelessOpImage
is intended as a convenient superclass
for OpImage
s that have no source image. Some examples are
constant color images, file readers, protocol-based network readers,
and mathematically-defined imagery such as fractals.
The computeTile
method of this class will call the
computeRect(PlanarImage[], WritableRaster, Rectangle)
method of the subclass to perform the computation. The first
argument will be null
as there are no source images.
OpImage
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 | |
SourcelessOpImage(ImageLayout layout,
Map configuration,
SampleModel sampleModel,
int minX,
int minY,
int width,
int height)
Constructs a SourcelessOpImage . |
Method Summary | |
boolean |
computesUniqueTiles()
Returns false as SourcelessOpImages often return Rasters via computeTile() tile that are internally cached. |
Raster |
computeTile(int tileX,
int tileY)
Computes a tile. |
Rectangle |
mapDestRect(Rectangle destRect,
int sourceIndex)
Throws an IllegalArgumentException since the image has no image sources. |
Rectangle |
mapSourceRect(Rectangle sourceRect,
int sourceIndex)
Throws an IllegalArgumentException since the image has no image sources. |
Methods inherited from class javax.media.jai.OpImage |
addTileToCache,
cancelTiles,
computeRect,
computeRect,
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 |
Constructor Detail |
public SourcelessOpImage(ImageLayout layout, Map configuration, SampleModel sampleModel, int minX, int minY, int width, int height)
SourcelessOpImage
. The image bounds
and SampleModel
are set explicitly; other layout
parameters may be set using the layout
parameter.
The min X, min Y, width, height, and SampleModel
fields of the layout
parameter are ignored.
If sampleModel
is null
, no
exceptions will be thrown. However, the caller must be sure to
set the sampleModel
instance variable before
construction terminates. This feature allows subclasses that
require external computation such as file loading to defer the
determination of their SampleModel
until after the
call to super
.
Similarly, minX
, minY
,
width
, and height
may be dummy values
if care is taken to manually set all values that depend on
them, namely the tile grid offset, tile size, and
SampleModel
width and height.
The tile dimensions, tile grid X and Y offsets, and
ColorModel
of the output will be set in the standard
way by the OpImage
constructor.
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.layout
- an ImageLayout
describing the layout.Method Detail |
public boolean computesUniqueTiles()
public Raster computeTile(int tileX, int tileY)
Subclasses should implement the
computeRect(PlanarImage[], WritableRaster, Rectangle)
method to perform the actual computation.
tileX
- The X index of the tile.tileY
- The Y index of the tile.public Rectangle mapSourceRect(Rectangle sourceRect, int sourceIndex)
sourceRect
- ignored.sourceIndex
- ignored.public Rectangle mapDestRect(Rectangle destRect, int sourceIndex)
destRect
- ignored.sourceIndex
- ignored.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |