An abstract superclass for classes that extend or "pad" a
WritableRaster with additional pixel data taken from a
PlanarImage. Instances of
BorderExtender are used by the
getExtendedData() and
copyExtendedData() methods in
PlanarImage.
Each instance of BorderExtender has an extend() method that takes a WritableRaster and a PlanarImage. The portion of the raster that intersects the bounds of the image will already contain a copy of the image data. The remaining area is to be filled in according to the policy of the BorderExtender subclass.
The standard subclasses of BorderExtender are BorderExtenderZero, which fills pixels with zeros; BorderExtenderConstant, which fills pixels with a given constant value; BorderExtenderCopy, which copies the edge pixels of the image; BorderExtenderWrap, which tiles the plane with repeating copies of the image; and BorderExtenderReflect, which is like BorderExtenderWrap except that each copy of the image is suitably reflected.
Instances of BorderExtenderConstant are constructed in the usual way. Instances of the other standard subclasses are obtained by means of the createInstance() method of this class.
BorderExtenderCopy is particularly useful as a way of padding image data prior to performing area or geometric operations such as convolution, scaling, and rotation.
@see PlanarImage#getExtendedData
@see PlanarImage#copyExtendedData
@see BorderExtenderConstant
@see BorderExtenderCopy
@see BorderExtenderReflect
@see BorderExtenderWrap
@see BorderExtenderZero