java.awt.image.ReplicateScaleFilter (JDK 1.1)
This class implements an ImageFilter that scales an image to a specified pixel size. It uses a very simple scaling algorithm in which rows and columns of image pixels are duplicated or omitted as necessary to achieve the desired size. See AreaAveragingScaleFilter for a scaling filter that results in smoother images.
The methods of this class are ImageConsumer methods used for communication between the image filter and the FilteredImageSource that uses it. Applications do not usually call these methods directly.
The easiest way to use this filter is to call Image.getScaledInstance(), specifying an appropriate hint constant.
public classReplicateScaleFilterextends ImageFilter { //Public ConstructorpublicReplicateScaleFilter(intwidth, intheight); //Protected Instance Variablesprotected intdestHeight; protected intdestWidth; protected Objectoutpixbuf; protected intsrcHeight; protected intsrcWidth; protected int[]srccols; protected int[]srcrows; //Public Instance Methodspublic voidsetDimensions(intw, inth); //Overrides ImageFilterpublic voidsetPixels(intx, inty, intw, inth, ColorModelmodel, public voidsetPixels'u'byte[]pixels, intoff, intscansize); //Overrides ImageFilterpublic voidsetPixels(intx, inty, intw, inth, ColorModelmodel, public voidsetPixels'u'int[]pixels, intoff, intscansize); //Overrides ImageFilterpublic voidsetProperties(Hashtableprops); //Overrides ImageFilter}
Hierarchy:
Object->ImageFilter(ImageConsumer, Cloneable)->ReplicateScaleFilter
Extended By:
AreaAveragingScaleFilter