home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / awt / image / RasterImageConsumer.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.9 KB  |  55 lines

  1. /*
  2.  * @(#)RasterImageConsumer.java    1.5 98/03/18
  3.  *
  4.  * Copyright 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.awt.image;
  16.  
  17. import java.util.Hashtable;
  18. import java.awt.image.ImageConsumer;
  19. import java.awt.image.ImageProducer;
  20. import java.awt.image.ColorModel;
  21. /**
  22.  * The interface for objects expressing interest in image data through
  23.  * the ImageProducer interfaces.  When a consumer is added to an image
  24.  * producer, the producer delivers all of the data about the image
  25.  * using the method calls defined in this interface.
  26.  *
  27.  * @see ImageProducer
  28.  *
  29.  * @version 10 Feb 1997
  30.  */
  31. public interface RasterImageConsumer extends ImageConsumer {
  32.     /**
  33.      * The pixels of the image are delivered using one or more calls
  34.      * to the setPixels method.  x and y specify the location and
  35.      * Raster.getWidth() and Raster.getHeight() specify the size
  36.      * of the rectangle of source pixels that are contained in the
  37.      * Raster. The specified ColorModel object should
  38.      * be used to convert the pixels into their corresponding color
  39.      * and alpha components. Pixels in the Raster can be accessed by
  40.      * using the <a href=java.awt.image.Raster.html#getPixelData>getPixelData</a> method:
  41.      * <pre>
  42.      *      int[] pixel = (int[])Raster.getPixelData(tx, ty, null);
  43.      * </pre>
  44.      * The variable pixel will contain one channel element for the specified
  45.      * location from each channel in the Raster.
  46.      * @see ColorModel
  47.      * @see Raster
  48.      */
  49.      void setPixels(int x, int y, ColorModel model, WritableRaster raster);
  50.  
  51. }
  52.  
  53.  
  54.  
  55.