FileDocCategorySizeDatePackage
ImageFilter.javaAPI DocAndroid 1.5 API3997Wed May 06 22:41:54 BST 2009java.awt.image

ImageFilter

public class ImageFilter extends Object implements ImageConsumer, Cloneable
The ImageFilter class provides a filter for delivering image data from an ImageProducer to an ImageConsumer.
since
Android 1.0

Fields Summary
protected ImageConsumer
consumer
The consumer.
Constructors Summary
public ImageFilter()
Instantiates a new ImageFilter.

        super();
    
Methods Summary
public java.lang.Objectclone()
Returns a copy of this ImageFilter.

return
a copy of this ImageFilter.

        try {
            return super.clone();
        } catch (CloneNotSupportedException e) {
            return null;
        }
    
public java.awt.image.ImageFiltergetFilterInstance(java.awt.image.ImageConsumer ic)
Gets an instance of an ImageFilter object which performs the filtering for the specified ImageConsumer.

param
ic the specified ImageConsumer.
return
an ImageFilter used to perform the filtering for the specified ImageConsumer.

        ImageFilter filter = (ImageFilter)clone();
        filter.consumer = ic;
        return filter;
    
public voidimageComplete(int status)

        consumer.imageComplete(status);
    
public voidresendTopDownLeftRight(java.awt.image.ImageProducer ip)
Responds to a request for a Top-Down-Left-Right ordered resend of the pixel data from an ImageConsumer.

param
ip the ImageProducer that provides this instance of the filter.

        ip.requestTopDownLeftRightResend(this);
    
public voidsetColorModel(java.awt.image.ColorModel model)

        consumer.setColorModel(model);
    
public voidsetDimensions(int width, int height)

        consumer.setDimensions(width, height);
    
public voidsetHints(int hints)

        consumer.setHints(hints);
    
public voidsetPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int off, int scansize)

        consumer.setPixels(x, y, w, h, model, pixels, off, scansize);
    
public voidsetPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int off, int scansize)

        consumer.setPixels(x, y, w, h, model, pixels, off, scansize);
    
public voidsetProperties(java.util.Hashtable props)

        Hashtable<Object, Object> fprops;
        if (props == null) {
            fprops = new Hashtable<Object, Object>();
        } else {
            fprops = (Hashtable<Object, Object>)props.clone();
        }
        String propName = "Filters"; //$NON-NLS-1$
        String prop = "Null filter"; //$NON-NLS-1$
        Object o = fprops.get(propName);
        if (o != null) {
            if (o instanceof String) {
                prop = (String)o + "; " + prop; //$NON-NLS-1$
            } else {
                prop = o.toString() + "; " + prop; //$NON-NLS-1$
            }
        }
        fprops.put(propName, prop);
        consumer.setProperties(fprops);