public abstract class AbstractRed extends Object implements CachableRed
Modifier and Type | Field and Description |
---|---|
protected Rectangle |
bounds |
protected ColorModel |
cm |
protected int |
minTileX |
protected int |
minTileY |
protected int |
numXTiles |
protected int |
numYTiles |
protected Map |
props |
protected SampleModel |
sm |
protected Vector |
srcs |
protected int |
tileGridXOff |
protected int |
tileGridYOff |
protected int |
tileHeight |
protected int |
tileWidth |
Modifier | Constructor and Description |
---|---|
protected |
AbstractRed()
void constructor.
|
protected |
AbstractRed(CachableRed src,
Map props)
Construct an Abstract RenderedImage from a source image and
props (may be null).
|
protected |
AbstractRed(CachableRed src,
Rectangle bounds,
ColorModel cm,
SampleModel sm,
int tileGridXOff,
int tileGridYOff,
Map props)
Construct an Abstract Rable from a bounds rect and props
(may be null).
|
protected |
AbstractRed(CachableRed src,
Rectangle bounds,
ColorModel cm,
SampleModel sm,
Map props)
Construct an Abstract RenderedImage from a source image, bounds
rect and props (may be null).
|
protected |
AbstractRed(CachableRed src,
Rectangle bounds,
Map props)
Construct an Abstract RenderedImage from a source image, bounds
rect and props (may be null).
|
protected |
AbstractRed(List srcs,
Rectangle bounds,
ColorModel cm,
SampleModel sm,
int tileGridXOff,
int tileGridYOff,
Map props)
Construct an Abstract RenderedImage from a bounds rect,
ColorModel (may be null), SampleModel (may be null), tile grid
offsets and props (may be null).
|
protected |
AbstractRed(List srcs,
Rectangle bounds,
ColorModel cm,
SampleModel sm,
Map props)
Construct an Abstract RenderedImage from a bounds rect,
ColorModel (may be null), SampleModel (may be null) and props
(may be null).
|
protected |
AbstractRed(List srcs,
Rectangle bounds,
Map props)
Construct an Abstract Rable from a List of sources a bounds rect
and props (may be null).
|
protected |
AbstractRed(Rectangle bounds,
Map props)
Construct an Abstract RenderedImage from a bounds rect and props
(may be null).
|
Modifier and Type | Method and Description |
---|---|
static void |
copyBand(Raster src,
int srcBand,
WritableRaster dst,
int dstBand) |
void |
copyToRaster(WritableRaster wr)
Copies data from this images tile grid into wr.
|
Rectangle |
getBounds()
Returns the bounds of the current image.
|
ColorModel |
getColorModel() |
Raster |
getData() |
Raster |
getData(Rectangle rect) |
Shape |
getDependencyRegion(int srcIndex,
Rectangle outputRgn)
Returns the region of input data is is required to generate
outputRgn.
|
Shape |
getDirtyRegion(int srcIndex,
Rectangle inputRgn)
This calculates the region of output that is affected by a change
in a region of input.
|
int |
getHeight() |
int |
getMinTileX() |
int |
getMinTileY() |
int |
getMinX() |
int |
getMinY() |
int |
getNumXTiles() |
int |
getNumYTiles() |
Object |
getProperty(String name) |
String[] |
getPropertyNames() |
SampleModel |
getSampleModel() |
Vector |
getSources() |
Raster |
getTile(int tileX,
int tileY) |
int |
getTileGridXOffset() |
int |
getTileGridYOffset() |
int |
getTileHeight() |
int |
getTileWidth() |
int |
getWidth() |
int |
getXTile(int xloc)
Returns the x index of tile under xloc.
|
int |
getYTile(int yloc)
Returns the y index of tile under yloc.
|
protected void |
init(CachableRed src,
Rectangle bounds,
ColorModel cm,
SampleModel sm,
int tileGridXOff,
int tileGridYOff,
Map props)
This is one of two basic init function (this is for single
source rendereds).
|
protected void |
init(List srcs,
Rectangle bounds,
ColorModel cm,
SampleModel sm,
int tileGridXOff,
int tileGridYOff,
Map props)
This is the basic init function.
|
WritableRaster |
makeTile(int tileX,
int tileY)
This is a helper function that will create the tile requested
Including properly subsetting the bounds of the tile to the
bounds of the current image.
|
protected void |
updateTileGridInfo()
This function computes all the basic information about the tile
grid based on the data stored in sm, and tileGridX/YOff.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copyData
protected Rectangle bounds
protected Vector srcs
protected Map props
protected SampleModel sm
protected ColorModel cm
protected int tileGridXOff
protected int tileGridYOff
protected int tileWidth
protected int tileHeight
protected int minTileX
protected int minTileY
protected int numXTiles
protected int numYTiles
protected AbstractRed()
protected AbstractRed(Rectangle bounds, Map props)
bounds
- this defines the extent of the rable in the
user coordinate system.props
- this initializes the props Map (may be null)protected AbstractRed(CachableRed src, Map props)
src
- will be the first (and only) member of the srcs
Vector. Src is also used to set the bounds, ColorModel,
SampleModel, and tile grid offsets.props
- this initializes the props Map.protected AbstractRed(CachableRed src, Rectangle bounds, Map props)
src
- will be the first (and only) member of the srcs
Vector. Src is also used to set the ColorModel, SampleModel,
and tile grid offsets.bounds
- The bounds of this image.props
- this initializes the props Map.protected AbstractRed(CachableRed src, Rectangle bounds, ColorModel cm, SampleModel sm, Map props)
src
- if not null, will be the first (and only) member
of the srcs Vector. Also if it is not null it provides the
tile grid offsets, otherwise they are zero.bounds
- The bounds of this image.cm
- The ColorModel to use. If null it will default to
ComponentColorModel.sm
- The sample model to use. If null it will construct
a sample model the matches the given/generated ColorModel and is
the size of bounds.props
- this initializes the props Map.protected AbstractRed(CachableRed src, Rectangle bounds, ColorModel cm, SampleModel sm, int tileGridXOff, int tileGridYOff, Map props)
src
- will be the first (and only) member of the srcs
Vector. Src is also used to set the ColorModel, SampleModel,
and tile grid offsets.bounds
- this defines the extent of the rable in the
user coordinate system.cm
- The ColorModel to use. If null it will default to
ComponentColorModel.sm
- The sample model to use. If null it will construct
a sample model the matches the given/generated ColorModel and is
the size of bounds.tileGridXOff
- The x location of tile 0,0.tileGridYOff
- The y location of tile 0,0.props
- this initializes the props Map.protected AbstractRed(List srcs, Rectangle bounds, Map props)
srcs
- This is used to initialize the srcs Vector. All
the members of srcs must be CachableRed otherwise an error
will be thrown.bounds
- this defines the extent of the rendered in pixelsprops
- this initializes the props Map.protected AbstractRed(List srcs, Rectangle bounds, ColorModel cm, SampleModel sm, Map props)
srcs
- This is used to initialize the srcs Vector. All
the members of srcs must be CachableRed otherwise an error
will be thrown.bounds
- this defines the extent of the rendered in pixelscm
- The ColorModel to use. If null it will default to
ComponentColorModel.sm
- The sample model to use. If null it will construct
a sample model the matches the given/generated ColorModel and is
the size of bounds.props
- this initializes the props Map.protected AbstractRed(List srcs, Rectangle bounds, ColorModel cm, SampleModel sm, int tileGridXOff, int tileGridYOff, Map props)
srcs
- This is used to initialize the srcs Vector. All
the members of srcs must be CachableRed otherwise an error
will be thrown.bounds
- this defines the extent of the rable in the
user coordinate system.cm
- The ColorModel to use. If null it will default to
ComponentColorModel.sm
- The sample model to use. If null it will construct
a sample model the matches the given/generated ColorModel and is
the size of bounds.tileGridXOff
- The x location of tile 0,0.tileGridYOff
- The y location of tile 0,0.props
- this initializes the props Map.protected void init(CachableRed src, Rectangle bounds, ColorModel cm, SampleModel sm, int tileGridXOff, int tileGridYOff, Map props)
src
- The source for the filterbounds
- The bounds of the imagecm
- The ColorModel to use. If null it defaults to
ComponentColorModel/ src's ColorModel.sm
- The Sample modle to use. If this is null it will
use the src's sample model if that is null it will
construct a sample model that matches the ColorModel
and is the size of the whole image.tileGridXOff
- The x location of tile 0,0.tileGridYOff
- The y location of tile 0,0.props
- Any properties you want to associate with the image.protected void init(List srcs, Rectangle bounds, ColorModel cm, SampleModel sm, int tileGridXOff, int tileGridYOff, Map props)
srcs
- The list of sourcesbounds
- The bounds of the imagecm
- The ColorModel to use. If null it defaults to
ComponentColorModel.sm
- The Sample modle to use. If this is null it will
construct a sample model that matches the ColorModel
and is the size of the whole image.tileGridXOff
- The x location of tile 0,0.tileGridYOff
- The y location of tile 0,0.props
- Any properties you want to associate with the image.protected void updateTileGridInfo()
public Rectangle getBounds()
CachableRed
getBounds
in interface CachableRed
public Vector getSources()
getSources
in interface RenderedImage
public ColorModel getColorModel()
getColorModel
in interface RenderedImage
public SampleModel getSampleModel()
getSampleModel
in interface RenderedImage
public int getMinX()
getMinX
in interface RenderedImage
public int getMinY()
getMinY
in interface RenderedImage
public int getWidth()
getWidth
in interface RenderedImage
public int getHeight()
getHeight
in interface RenderedImage
public int getTileWidth()
getTileWidth
in interface RenderedImage
public int getTileHeight()
getTileHeight
in interface RenderedImage
public int getTileGridXOffset()
getTileGridXOffset
in interface RenderedImage
public int getTileGridYOffset()
getTileGridYOffset
in interface RenderedImage
public int getMinTileX()
getMinTileX
in interface RenderedImage
public int getMinTileY()
getMinTileY
in interface RenderedImage
public int getNumXTiles()
getNumXTiles
in interface RenderedImage
public int getNumYTiles()
getNumYTiles
in interface RenderedImage
public Object getProperty(String name)
getProperty
in interface RenderedImage
public String[] getPropertyNames()
getPropertyNames
in interface RenderedImage
public Shape getDependencyRegion(int srcIndex, Rectangle outputRgn)
CachableRed
getDependencyRegion
in interface CachableRed
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.public Shape getDirtyRegion(int srcIndex, Rectangle inputRgn)
CachableRed
getDirtyRegion
in interface CachableRed
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.public Raster getTile(int tileX, int tileY)
getTile
in interface RenderedImage
public Raster getData()
getData
in interface RenderedImage
public Raster getData(Rectangle rect)
getData
in interface RenderedImage
public final int getXTile(int xloc)
xloc
- the x location (in pixels) to get tile for.public final int getYTile(int yloc)
yloc
- the y location (in pixels) to get tile for.public void copyToRaster(WritableRaster wr)
wr
- Raster to fill with image data.public WritableRaster makeTile(int tileX, int tileY)
tileX
- The x index of the tile to be builttileY
- The y index of the tile to be builtIndexOutOfBoundsException
- if the requested tile index
falles outside of the bounds of the tile grid for the image.public static void copyBand(Raster src, int srcBand, WritableRaster dst, int dstBand)
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.