|
http://www.eteks.com | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Image | +--com.eteks.awt.PJAImage
Pure Java AWT Image implementation. This image stores in a buffer an offscreen image using default RGB color model or another indexed color model.
Fields inherited from class java.awt.Image |
SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty |
Constructor Summary | |
PJAImage(java.awt.image.ImageProducer producer)
Creates an initial image with a producer. |
|
PJAImage(int width,
int height)
Creates an empty image of width x height pixels. |
|
PJAImage(int width,
int height,
java.awt.image.ColorModel colorModel)
Creates an empty image of width x height pixels. |
Method Summary | |
protected int |
check(java.awt.image.ImageObserver observer)
|
void |
flush()
java.awt.Image implementation. |
java.awt.image.ColorModel |
getColorModel()
Returns this image's color model |
java.awt.Graphics |
getGraphics()
java.awt.Image implementation.
|
protected int |
getHeight()
|
int |
getHeight(java.awt.image.ImageObserver observer)
java.awt.Image implementation. |
protected int |
getPixelColor(int x,
int y)
Gets the color at the point (x,y) . |
protected int[] |
getPixels()
Gets the array used to store the pixels of this image. |
protected java.lang.Object |
getPixelsArray()
Gets the array used to store the pixels of this image. |
java.lang.Object |
getProperty(java.lang.String name,
java.awt.image.ImageObserver observer)
java.awt.Image implementation. |
java.awt.image.ImageProducer |
getSource()
java.awt.Image implementation. |
protected int |
getWidth()
|
int |
getWidth(java.awt.image.ImageObserver observer)
java.awt.Image implementation. |
protected boolean |
prepare(java.awt.image.ImageObserver observer)
|
protected void |
setPixelColor(int x,
int y,
int ARGB)
Sets the color at the point (x,y) . |
void |
sync()
Synchronizes the image loading. |
Methods inherited from class java.awt.Image |
getScaledInstance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PJAImage(java.awt.image.ImageProducer producer)
producer
- An instance of a class that implements ImagePoducer
.public PJAImage(int width, int height)
width x height
pixels. The image is created transparent.PJAToolkit
public PJAImage(int width, int height, java.awt.image.ColorModel colorModel)
width x height
pixels. The image is created transparent
with colorModel
color model.Method Detail |
public java.lang.Object getProperty(java.lang.String name, java.awt.image.ImageObserver observer)
java.awt.Image
implementation.getProperty
in class java.awt.Image
Image
public int getWidth(java.awt.image.ImageObserver observer)
java.awt.Image
implementation.getWidth
in class java.awt.Image
Image
public int getHeight(java.awt.image.ImageObserver observer)
java.awt.Image
implementation.getHeight
in class java.awt.Image
Image
public java.awt.image.ImageProducer getSource()
java.awt.Image
implementation.getSource
in class java.awt.Image
Image
public java.awt.Graphics getGraphics()
java.awt.Image
implementation.
Contrary to JDK default behavior, PJA allows to retrieve
an instance of Graphics
on images created with a producer.
This enables to draw in transparent images.getGraphics
in class java.awt.Image
Image
public java.awt.image.ColorModel getColorModel()
null
means the default color model.public void flush()
java.awt.Image
implementation.flush
in class java.awt.Image
Image
protected int check(java.awt.image.ImageObserver observer)
protected boolean prepare(java.awt.image.ImageObserver observer)
protected int getWidth()
protected int getHeight()
protected int[] getPixels()
int
or null
if the array
contains byte
or if the image was flushed.protected java.lang.Object getPixelsArray()
int
or byte
.protected int getPixelColor(int x, int y)
(x,y)
.x
- the point coordinates.y
- protected void setPixelColor(int x, int y, int ARGB)
(x,y)
.x
- the point coordinates.y
- ARGB
- the color of the point in default RGB model.public void sync()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |