javax.media.jai
Class BorderExtenderWrap

java.lang.Object
  |
  +--javax.media.jai.BorderExtender
        |
        +--javax.media.jai.BorderExtenderWrap
All Implemented Interfaces:
Serializable

public class BorderExtenderWrap
extends BorderExtender

A subclass of BorderExtender that implements border extension by filling all pixels outside of the image bounds with copies of the whole image. For example, the image:

ABC
DEF
GHI

if extended by adding two extra rows to the top and bottom and two extra columns on the left and right sides, would become:

EFDEFDE
HIGHIGH
BCABCAB
EFDEFDE
HIGHIGH
BCABCAB
EFDEFDE

This form of extension is appropriate for data that is inherently periodic, such as the Fourier transform of an image, or a wallpaper pattern.

See Also:
BorderExtender, Serialized Form

Fields inherited from class javax.media.jai.BorderExtender
BORDER_COPY, BORDER_REFLECT, BORDER_WRAP, BORDER_ZERO
 
Method Summary
 void extend(WritableRaster raster, PlanarImage im)
          Fills in the portions of a given Raster that lie outside the bounds of a given PlanarImage with copies of the entire image.
 
Methods inherited from class javax.media.jai.BorderExtender
createInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

extend

public final void extend(WritableRaster raster,
                         PlanarImage im)
Fills in the portions of a given Raster that lie outside the bounds of a given PlanarImage with copies of the entire image.

The portion of raster that lies within im.getBounds() is not altered.

Overrides:
extend in class BorderExtender
Parameters:
raster - The WritableRaster the border area of which is to be filled with copies of the given image.
im - The PlanarImage which will be copied to fill the border area of the WritableRaster.
Throws:
IllegalArgumentException - if either parameter is null.