| javax.media.jai.WarpOpImage com.sun.media.jai.mlib.MlibWarpPolynomialOpImage
MlibWarpPolynomialOpImage | final class MlibWarpPolynomialOpImage extends WarpOpImage (Code) | | An OpImage implementing the polynomial "Warp" operation
using MediaLib.
With warp operations, there is no forward mapping (from source to
destination). JAI images are tiled, while mediaLib does not handle
tiles and consider each tile an individual image. For each tile in
destination, in order not to cobble the entire source image, the
computeTile method in this class attemps to do a backward
mapping on the tile region using the pixels along the perimeter of the
rectangular region. The hope is that the mapped source rectangle
should include all source pixels needed for this particular destination
tile. However, with certain unusual warp points, an inner destination
pixel may be mapped outside of the mapped perimeter pixels. In this
case, this destination pixel is not filled, and left black.
See Also: javax.media.jai.operator.WarpDescriptor See Also: MlibWarpRIF since: 1.0 |
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.
Parameters: destRect - the Rectangle in destination coordinates. Parameters: sourceIndex - the index of the source image. | protected void | computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) Performs the "Warp" operation on a rectangular region of
the same. | public Raster | computeTile(int tileX, int tileY) Computes a tile. |
MlibWarpPolynomialOpImage | public MlibWarpPolynomialOpImage(RenderedImage source, BorderExtender extender, Map config, ImageLayout layout, WarpPolynomial warp, Interpolation interp, int filter, double[] backgroundValues)(Code) | | Constructs a MlibWarpPolynomialOpImage .
Parameters: source - The source image. Parameters: layout - The destination image layout. Parameters: warp - An object defining the warp algorithm. Parameters: interp - An object describing the interpolation method. |
backwardMapRect | protected Rectangle backwardMapRect(Rectangle destRect, int sourceIndex)(Code) | | Returns the minimum bounding box of the region of the specified
source to which a particular Rectangle of the
destination will be mapped.
Parameters: destRect - the Rectangle in destination coordinates. Parameters: sourceIndex - the index of the source image. a Rectangle indicating the source bounding box,or null if the bounding box is unknown. throws: IllegalArgumentException - if sourceIndex isnegative or greater than the index of the last source. throws: IllegalArgumentException - if destRect isnull . |
computeRect | protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)(Code) | | Performs the "Warp" operation on a rectangular region of
the same.
|
computeTile | public Raster computeTile(int tileX, int tileY)(Code) | | Computes a tile. A new WritableRaster is created to
represent the requested tile. Its width and height equals to this
image's tile width and tile height respectively. If the requested
tile lies outside of the image's boundary, the created raster is
returned with all of its pixels set to 0.
This method overrides the method in WarpOpImage
and performs source cobbling when necessary. MediaLib is used to
calculate the actual warping.
Parameters: tileX - The X index of the tile. Parameters: tileY - The Y index of the tile. The tile as a Raster . |
|
|