|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.image.BandCombineOp
The width of the matrix must be equal to the number of bands in the source Raster, optionally plus one. If there is one more column in the matrix than the number of bands, there is an implied 1 at the end of the vector of band samples representing a pixel. The height of the matrix must be equal to the number of bands in the destination. For example, a 3-banded Raster might have the following transformation applied to each pixel in order to invert the second band of the Raster.
[ 1.0 0.0 0.0 0.0 ] [ b1 ] [ 0.0 -1.0 0.0 255.0 ] x [ b2 ] [ 0.0 0.0 1.0 0.0 ] [ b3 ] [ 1 ]
Note that the source and destination can be the same object.
Constructor Summary | |
BandCombineOp(float[][] matrix,
RenderingHints hints)
Constructs a BandCombineOp with the specified matrix. |
Method Summary | |
WritableRaster | createCompatibleDestRaster(Raster src)
Creates a zeroed destination Raster with the correct size and number of bands. |
WritableRaster | filter(Raster src,
WritableRaster dst)
Transforms the Raster using the matrix in the constructor. |
Rectangle2D | getBounds2D(Raster src)
Returns the bounding box of the transformed destination. |
float[][] | getMatrix()
Returns the matrix. |
Point2D | getPoint2D(Point2D srcPt,
Point2D dstPt)
Returns the location of the destination point given a point in the source Raster. |
RenderingHints | getRenderingHints()
Returns the rendering hints used by this op. |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
public BandCombineOp(float[][] matrix, RenderingHints hints)
Method Detail |
public final float[][] getMatrix()
public WritableRaster filter(Raster src, WritableRaster dst)
public final Rectangle2D getBounds2D(Raster src)
public WritableRaster createCompatibleDestRaster(Raster src)
src
- Source Raster for the filter operation.public final Point2D getPoint2D(Point2D srcPt, Point2D dstPt)
public final RenderingHints getRenderingHints()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |