All Packages Class Hierarchy This Package Previous Next Index
Interface java.awt.image.RasterImageConsumer
- public interface RasterImageConsumer
- extends ImageConsumer
The interface for objects expressing interest in image data through
the ImageProducer interfaces. When a consumer is added to an image
producer, the producer delivers all of the data about the image
using the method calls defined in this interface.
- See Also:
- ImageProducer
setPixels(int, int, ColorModel, WritableRaster)
- The pixels of the image are delivered using one or more calls
to the setPixels method.
setPixels
public abstract void setPixels(int x,
int y,
ColorModel model,
WritableRaster raster)
- The pixels of the image are delivered using one or more calls
to the setPixels method. x and y specify the location and
Raster.getWidth() and Raster.getHeight() specify the size
of the rectangle of source pixels that are contained in the
Raster. The specified ColorModel object should
be used to convert the pixels into their corresponding color
and alpha components. Pixels in the Raster can be accessed by
using the getPixelData method:
int[] pixel = (int[])Raster.getPixelData(tx, ty, null);
The variable pixel will contain one channel element for the specified
location from each channel in the Raster.
- See Also:
- ColorModel, Raster
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature