< prev index next >

src/java.desktop/share/classes/java/awt/image/BufferedImageFilter.java

Print this page

        

*** 28,41 **** import java.util.Hashtable; import java.awt.image.ImageConsumer; import java.awt.image.ImageFilter; /** ! * The <code>BufferedImageFilter</code> class subclasses an ! * <code>ImageFilter</code> to provide a simple means of * using a single-source/single-destination image operator ! * ({@link BufferedImageOp}) to filter a <code>BufferedImage</code> * in the Image Producer/Consumer/Observer * paradigm. Examples of these image operators are: {@link ConvolveOp}, * {@link AffineTransformOp} and {@link LookupOp}. * * @see ImageFilter --- 28,41 ---- import java.util.Hashtable; import java.awt.image.ImageConsumer; import java.awt.image.ImageFilter; /** ! * The {@code BufferedImageFilter} class subclasses an ! * {@code ImageFilter} to provide a simple means of * using a single-source/single-destination image operator ! * ({@link BufferedImageOp}) to filter a {@code BufferedImage} * in the Image Producer/Consumer/Observer * paradigm. Examples of these image operators are: {@link ConvolveOp}, * {@link AffineTransformOp} and {@link LookupOp}. * * @see ImageFilter
*** 50,63 **** int height; byte[] bytePixels; int[] intPixels; /** ! * Constructs a <code>BufferedImageFilter</code> with the * specified single-source/single-destination operator. ! * @param op the specified <code>BufferedImageOp</code> to ! * use to filter a <code>BufferedImage</code> * @throws NullPointerException if op is null */ public BufferedImageFilter (BufferedImageOp op) { super(); if (op == null) { --- 50,63 ---- int height; byte[] bytePixels; int[] intPixels; /** ! * Constructs a {@code BufferedImageFilter} with the * specified single-source/single-destination operator. ! * @param op the specified {@code BufferedImageOp} to ! * use to filter a {@code BufferedImage} * @throws NullPointerException if op is null */ public BufferedImageFilter (BufferedImageOp op) { super(); if (op == null) {
*** 65,76 **** } bufferedImageOp = op; } /** ! * Returns the <code>BufferedImageOp</code>. ! * @return the operator of this <code>BufferedImageFilter</code>. */ public BufferedImageOp getBufferedImageOp() { return bufferedImageOp; } --- 65,76 ---- } bufferedImageOp = op; } /** ! * Returns the {@code BufferedImageOp}. ! * @return the operator of this {@code BufferedImageFilter}. */ public BufferedImageOp getBufferedImageOp() { return bufferedImageOp; }
*** 78,97 **** * Filters the information provided in the * {@link ImageConsumer#setDimensions(int, int) setDimensions } method * of the {@link ImageConsumer} interface. * <p> * Note: This method is intended to be called by the ! * {@link ImageProducer} of the <code>Image</code> whose pixels are * being filtered. Developers using this class to retrieve pixels from * an image should avoid calling this method directly since that * operation could result in problems with retrieving the requested * pixels. * * @param width the width to which to set the width of this ! * <code>BufferedImageFilter</code> * @param height the height to which to set the height of this ! * <code>BufferedImageFilter</code> * @see ImageConsumer#setDimensions */ public void setDimensions(int width, int height) { if (width <= 0 || height <= 0) { imageComplete(STATICIMAGEDONE); --- 78,97 ---- * Filters the information provided in the * {@link ImageConsumer#setDimensions(int, int) setDimensions } method * of the {@link ImageConsumer} interface. * <p> * Note: This method is intended to be called by the ! * {@link ImageProducer} of the {@code Image} whose pixels are * being filtered. Developers using this class to retrieve pixels from * an image should avoid calling this method directly since that * operation could result in problems with retrieving the requested * pixels. * * @param width the width to which to set the width of this ! * {@code BufferedImageFilter} * @param height the height to which to set the height of this ! * {@code BufferedImageFilter} * @see ImageConsumer#setDimensions */ public void setDimensions(int width, int height) { if (width <= 0 || height <= 0) { imageComplete(STATICIMAGEDONE);
*** 102,126 **** } /** * Filters the information provided in the * {@link ImageConsumer#setColorModel(ColorModel) setColorModel} method ! * of the <code>ImageConsumer</code> interface. * <p> ! * If <code>model</code> is <code>null</code>, this ! * method clears the current <code>ColorModel</code> of this ! * <code>BufferedImageFilter</code>. * <p> * Note: This method is intended to be called by the ! * <code>ImageProducer</code> of the <code>Image</code> * whose pixels are being filtered. Developers using this * class to retrieve pixels from an image * should avoid calling this method directly since that * operation could result in problems with retrieving the * requested pixels. * @param model the {@link ColorModel} to which to set the ! * <code>ColorModel</code> of this <code>BufferedImageFilter</code> * @see ImageConsumer#setColorModel */ public void setColorModel(ColorModel model) { this.model = model; } --- 102,126 ---- } /** * Filters the information provided in the * {@link ImageConsumer#setColorModel(ColorModel) setColorModel} method ! * of the {@code ImageConsumer} interface. * <p> ! * If {@code model} is {@code null}, this ! * method clears the current {@code ColorModel} of this ! * {@code BufferedImageFilter}. * <p> * Note: This method is intended to be called by the ! * {@code ImageProducer} of the {@code Image} * whose pixels are being filtered. Developers using this * class to retrieve pixels from an image * should avoid calling this method directly since that * operation could result in problems with retrieving the * requested pixels. * @param model the {@link ColorModel} to which to set the ! * {@code ColorModel} of this {@code BufferedImageFilter} * @see ImageConsumer#setColorModel */ public void setColorModel(ColorModel model) { this.model = model; }
*** 141,156 **** intPixels = newpixels; this.model = ColorModel.getRGBdefault(); } /** ! * Filters the information provided in the <code>setPixels</code> ! * method of the <code>ImageConsumer</code> interface which takes * an array of bytes. * <p> * Note: This method is intended to be called by the ! * <code>ImageProducer</code> of the <code>Image</code> whose pixels * are being filtered. Developers using * this class to retrieve pixels from an image should avoid calling * this method directly since that operation could result in problems * with retrieving the requested pixels. * @throws IllegalArgumentException if width or height are less than --- 141,156 ---- intPixels = newpixels; this.model = ColorModel.getRGBdefault(); } /** ! * Filters the information provided in the {@code setPixels} ! * method of the {@code ImageConsumer} interface which takes * an array of bytes. * <p> * Note: This method is intended to be called by the ! * {@code ImageProducer} of the {@code Image} whose pixels * are being filtered. Developers using * this class to retrieve pixels from an image should avoid calling * this method directly since that operation could result in problems * with retrieving the requested pixels. * @throws IllegalArgumentException if width or height are less than
*** 228,243 **** dstPtr += dstRem; } } } /** ! * Filters the information provided in the <code>setPixels</code> ! * method of the <code>ImageConsumer</code> interface which takes * an array of integers. * <p> * Note: This method is intended to be called by the ! * <code>ImageProducer</code> of the <code>Image</code> whose * pixels are being filtered. Developers using this class to * retrieve pixels from an image should avoid calling this method * directly since that operation could result in problems * with retrieving the requested pixels. * @throws IllegalArgumentException if width or height are less than --- 228,243 ---- dstPtr += dstRem; } } } /** ! * Filters the information provided in the {@code setPixels} ! * method of the {@code ImageConsumer} interface which takes * an array of integers. * <p> * Note: This method is intended to be called by the ! * {@code ImageProducer} of the {@code Image} whose * pixels are being filtered. Developers using this class to * retrieve pixels from an image should avoid calling this method * directly since that operation could result in problems * with retrieving the requested pixels. * @throws IllegalArgumentException if width or height are less than
*** 319,340 **** } } } /** ! * Filters the information provided in the <code>imageComplete</code> ! * method of the <code>ImageConsumer</code> interface. * <p> * Note: This method is intended to be called by the ! * <code>ImageProducer</code> of the <code>Image</code> whose pixels * are being filtered. Developers using * this class to retrieve pixels from an image should avoid calling * this method directly since that operation could result in problems * with retrieving the requested pixels. * @param status the status of image loading * @throws ImagingOpException if there was a problem calling the filter ! * method of the <code>BufferedImageOp</code> associated with this * instance. * @see ImageConsumer#imageComplete */ public void imageComplete(int status) { WritableRaster wr; --- 319,340 ---- } } } /** ! * Filters the information provided in the {@code imageComplete} ! * method of the {@code ImageConsumer} interface. * <p> * Note: This method is intended to be called by the ! * {@code ImageProducer} of the {@code Image} whose pixels * are being filtered. Developers using * this class to retrieve pixels from an image should avoid calling * this method directly since that operation could result in problems * with retrieving the requested pixels. * @param status the status of image loading * @throws ImagingOpException if there was a problem calling the filter ! * method of the {@code BufferedImageOp} associated with this * instance. * @see ImageConsumer#imageComplete */ public void imageComplete(int status) { WritableRaster wr;
< prev index next >