|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graphics.awt.AWTPixelGrabber
The AWTPixelGrabber class is used to transfer the pixels of a
java.awt.Image into a
com.tensegrity.graphics.image.Raster.
To do that the AWTPixelGrabber class implements the
java.awt.image.ImageConsumer interface and uses the
java.awt.image.ImageProducer interface to receive the
pixels.
To get more informations about these interfaces and the mechanism they are
associated with please take a look at the documentation of
ImageConsumer and/or
ImageProducer.
| Field Summary | |
int |
ABORT
constant that tells about one of the states of the AWTPixelGrabber |
int |
ERROR
constant that tells about one of the states of the AWTPixelGrabber |
int |
GRAB_CX
constant that tells about one of the states of the AWTPixelGrabber |
int |
GRAB_CY
constant that tells about one of the states of the AWTPixelGrabber |
int |
GRABBING
constant that tells about one of the states of the AWTPixelGrabber |
int |
INACTIVE
constant that tells about one of the states of the AWTPixelGrabber |
| Fields inherited from interface java.awt.image.ImageConsumer |
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT |
| Constructor Summary | |
AWTPixelGrabber(java.awt.image.ImageProducer producer,
Raster raster)
Constructor that creates a AWTPixelGrabber for the
ImageProducer given by producer. |
|
| Method Summary | |
int |
getState()
Returns a constant that tells about the current state of the AWTPixelGrabber. |
void |
grab()
Starts the grabbing process. |
void |
grab(long millis)
Starts the grabbing process with respect to the timeout given by millis. |
void |
imageComplete(int status)
|
boolean |
isValid()
Returns a boolean that indicates whether the last grabbing
process was successful or not. |
void |
setColorModel(java.awt.image.ColorModel model)
|
void |
setDimensions(int width,
int height)
|
void |
setHints(int hintflags)
|
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scansize)
|
void |
setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scansize)
|
void |
setProperties(java.util.Hashtable props)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final int INACTIVE
AWTPixelGrabber
public final int ERROR
AWTPixelGrabber
public final int ABORT
AWTPixelGrabber
public final int GRABBING
AWTPixelGrabber
public final int GRAB_CX
AWTPixelGrabber
public final int GRAB_CY
AWTPixelGrabber
| Constructor Detail |
public AWTPixelGrabber(java.awt.image.ImageProducer producer,
Raster raster)
AWTPixelGrabber for the
ImageProducer given by producer. The grabbed
pixels are written to the Raster given by
raster.
producer - the ImageProducer to grab the pixels fromraster - the Raster to write the grabbed pixels to| Method Detail |
public int getState()
AWTPixelGrabber. The returned constants are listed below:
public boolean isValid()
boolean that indicates whether the last grabbing
process was successful or not.
public void grab()
public void grab(long millis)
millis. If the timeout value has been passed over the
grabbing process is aborted.
millis - the timeout value in milliseconds
public void setDimensions(int width,
int height)
setDimensions in interface java.awt.image.ImageConsumerpublic void setProperties(java.util.Hashtable props)
setProperties in interface java.awt.image.ImageConsumerpublic void setColorModel(java.awt.image.ColorModel model)
setColorModel in interface java.awt.image.ImageConsumerpublic void setHints(int hintflags)
setHints in interface java.awt.image.ImageConsumer
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
byte[] pixels,
int off,
int scansize)
setPixels in interface java.awt.image.ImageConsumer
public void setPixels(int x,
int y,
int w,
int h,
java.awt.image.ColorModel model,
int[] pixels,
int off,
int scansize)
setPixels in interface java.awt.image.ImageConsumerpublic void imageComplete(int status)
imageComplete in interface java.awt.image.ImageConsumer
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||