MemoryImageSource

Name

MemoryImageSource

[Graphic: Figure from the text]

Description

The MemoryImageSource class allows you to create images completely in memory. You provide an array of data; it serves as an image producer for that data. In the 1.1 release, new methods support using this class for animation (notably setAnimated() and the various overrides of newPixels()).

Class Definition

public class java.awt.image.MemoryImageSource extends java.lang.Object implements java.awt.image.ImageProducer {
 // Constructors public MemoryImageSource (int w, int h, ColorModel cm, byte[] pix, int off, int scan);
public MemoryImageSource (int w, int h, ColorModel cm, byte[] pix, int off, int scan, Hashtable props);
public MemoryImageSource (int w, int h, ColorModel cm, int[] pix, int off, int scan);
public MemoryImageSource (int w, int h, ColorModel cm, int[] pix, int off, int scan, Hashtable props);
public MemoryImageSource (int w, int h, int[] pix, int off, int scan);
public MemoryImageSource (int w, int h, int[] pix, int off, int scan, Hashtable props); // Instance Methods public synchronized void addConsumer (ImageConsumer ic);
public synchronized boolean isConsumer (ImageConsumer ic);
public void newPixels(); public synchronized void newPixels (int x, int y, int w, int h); public synchronized void newPixels (int x, int y, int w, int h, boolean framenotify); public synchronized void newPixels (byte[] newpix, ColorModel newmodel, int offset, int scansize); public synchronized void newPixels (int[] newpix, ColorModel newmodel, int offset, int scansize); public synchronized void removeConsumer (ImageConsumer ic);
public void requestTopDownLeftRightResend (ImageConsumer ic);
public synchronized void setAnimated (boolean animated); public synchronized void setFullBufferUpdates (boolean fullbuffers); public void startProduction (ImageConsumer ic);
}

Constructors

MemoryImageSource

public MemoryImageSource (int w, int h, ColorModel cm, byte[] pix, int off, int scan)

public MemoryImageSource (int w, int h, ColorModel cm, byte[] pix, int off, int scan, Hashtable props)

public MemoryImageSource (int w, int h, ColorModel cm, int[] pix, int off, int scan)

public MemoryImageSource (int w, int h, ColorModel cm, int[] pix, int off, int scan, Hashtable props)

public MemoryImageSource (int w, int h, int[] pix, int off, int scan)

public MemoryImageSource (int w, int h, int[] pix, int off, int scan, Hashtable props)

Class Methods

addConsumer

public synchronized void addConsumer (ImageConsumer ic)

isConsumer

public synchronized boolean isConsumer (ImageConsumer ic)

newPixels

public synchronized void newPixels()

public synchronized void newPixels (int x, int y, int w, int h, boolean framenotify)

public synchronized void newPixels (int x, int y, int w, int h, boolean framenotify)

public synchronized void newPixels (byte[] newpix, ColorModel newmodel, int offset, int scansize)

public synchronized void newPixels (int[] newpix, ColorModel newmodel, int offset, int scansize)

removeConsumer

public void removeConsumer (ImageConsumer ic)

requestTopDownLeftRightResend

public void requestTopDownLeftRightResend (ImageConsumer ic)

setAnimated

public void setAnimated (boolean animated)

setFullBufferUpdates

public void setFullBufferUpdates (boolean fullbuffers)

startProduction

public void startProduction (ImageConsumer ic)

See Also

ColorModel, Hashtable, ImageConsumer, ImageProducer, Object