ReplicateScaleFilterNameReplicateScaleFilter
DescriptionThe ReplicateScaleFilter class uses a simple-minded algorithm to scale an image. If the image is to be reduced, rows and columns of pixels are removed. If the image is to be expanded, rows and columns are duplicated (replicated). Class Definition
public class ReplicateScaleFilter extends java.awt.image.ImageFilter { // Variables protected int destHeight; protected int destWidth; protected Object outpixbuf; protected int srcHeight; protected int srcWidth; protected int[] srccols; protected int[] srcrows; // Constructor public ReplicateScaleFilter(int width, int height); // Instance Methods public void setDimensions (int w, int h); public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize); public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize); public void setProperties(Hashtable props); } VariablesdestHeightprotected int destHeightHeight of the scaled image. destWidthprotected int destWidthWidth of the scaled image. outpixbufprotected Object outpixbufAn internal buffer. srcHeightprotected int srcHeightHeight of the original image. srcWidthprotected int srcWidthWidth of the original image. srccolsprotected int[] srccolsInternal array used to map incoming columns to outgoing columns. srcrowsprotected int[] srcrowsInternal array used to map incoming rows to outgoing rows. ConstructorReplicateScaleFilterpublic ReplicateScaleFilter (int width, int height)
Instance MethodssetDimensionspublic void setDimensions (int w, int h)
setPixelsvoid setPixels (int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
void setPixels (int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
setPropertiespublic void setProperties (Hashtable props)
See AlsoColorModel, Hashtable, ImageConsumer, ImageFilter, ImageProducer |
|