|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object captcha.graphics.RgbMemoryImageConsumer
public class RgbMemoryImageConsumer
This class grabs the pixels of an image from an ImageProducer.
Field Summary | |
---|---|
private int |
m_height
Stores the height of the produced image. |
private java.awt.image.ImageProducer |
m_imageProducer
Stores the ImageProducer, which produces the image data. |
private boolean |
m_productionComplete
Stores whether the image production is ready. |
private java.lang.Object |
m_productionLock
This Object is needed for internal synchronization. |
private int[] |
m_rgbPixels
Stores the pixels of the image in the RGB format. |
private int |
m_width
Stores the width of the produced image. |
Fields inherited from interface java.awt.image.ImageConsumer |
---|
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT |
Constructor Summary | |
---|---|
RgbMemoryImageConsumer(java.awt.image.ImageProducer a_imageProducer)
Creates a ne RgbMemoryImageConsumer. |
Method Summary | |
---|---|
int |
getHeight()
Returns the height of the produced image. |
int[] |
getRgbPixels()
Returns a copy of the pixel data of the produced image in the default RGB color model. |
int |
getWidth()
Returns the width of the produced image. |
void |
imageComplete(int a_status)
This method is called by the ImageProducer, if the image production is ready. |
void |
setColorModel(java.awt.image.ColorModel a_colorModel)
This method is only for compatibility with the ImageConsumer interface. |
void |
setDimensions(int a_width,
int a_height)
This method sets the dimensions of the produced image. |
void |
setHints(int a_hints)
This method is only for compatibility with the ImageConsumer interface. |
void |
setPixels(int a_posX,
int a_posY,
int a_width,
int a_height,
java.awt.image.ColorModel a_colorModel,
byte[] a_pixels,
int a_offset,
int a_scansize)
This method transfers the pixels between ImageProducer and ImageConsumer. |
void |
setPixels(int a_posX,
int a_posY,
int a_width,
int a_height,
java.awt.image.ColorModel a_colorModel,
int[] a_pixels,
int a_offset,
int a_scansize)
This method transfers the pixels between ImageProducer and ImageConsumer. |
void |
setProperties(java.util.Hashtable a_properties)
This method is only for compatibility with the ImageConsumer interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int[] m_rgbPixels
private java.awt.image.ImageProducer m_imageProducer
private int m_width
private int m_height
private java.lang.Object m_productionLock
private boolean m_productionComplete
Constructor Detail |
---|
public RgbMemoryImageConsumer(java.awt.image.ImageProducer a_imageProducer)
a_imageProducer
- The ImageProducer which produces the image.Method Detail |
---|
public void imageComplete(int a_status)
imageComplete
in interface java.awt.image.ImageConsumer
a_status
- The error code of the image production.public void setColorModel(java.awt.image.ColorModel a_colorModel)
setColorModel
in interface java.awt.image.ImageConsumer
a_colorModel
- The default color model of the produced pixels.public void setDimensions(int a_width, int a_height)
setDimensions
in interface java.awt.image.ImageConsumer
a_width
- The width of the produced image.a_height
- The height of the produced image.public void setHints(int a_hints)
setHints
in interface java.awt.image.ImageConsumer
a_hints
- Some hints about the pixel transfer between ImageProducer and ImageConsumer.public void setPixels(int a_posX, int a_posY, int a_width, int a_height, java.awt.image.ColorModel a_colorModel, int[] a_pixels, int a_offset, int a_scansize)
setPixels
in interface java.awt.image.ImageConsumer
a_posX
- The X position of the transfer rectangle.a_posY
- The Y position of the transfer rectangle.a_width
- The width of the transfer rectangle.a_height
- The height of the transfer rectangle.a_pixels
- The pixel data of the transfer rectangle.a_offset
- The offset in the pixel data array.a_scansize
- The length of each line in the pixel data array.public void setPixels(int a_posX, int a_posY, int a_width, int a_height, java.awt.image.ColorModel a_colorModel, byte[] a_pixels, int a_offset, int a_scansize)
setPixels
in interface java.awt.image.ImageConsumer
a_posX
- The X position of the transfer rectangle.a_posY
- The Y position of the transfer rectangle.a_width
- The width of the transfer rectangle.a_height
- The height of the transfer rectangle.a_pixels
- The pixel data of the transfer rectangle.a_offset
- The offset in the pixel data array.a_scansize
- The length of each line in the pixel data array.public void setProperties(java.util.Hashtable a_properties)
setProperties
in interface java.awt.image.ImageConsumer
a_properties
- Some properties for the produced image.public int getWidth()
public int getHeight()
public int[] getRgbPixels()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |