|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.javagear.FastImage
public class FastImage
FastImage implements ImageProducer
and is used to reconstruct the image
whenever it is needed.
Field Summary | |
---|---|
private java.awt.image.ImageConsumer |
consumer
Image consumer. |
private int |
height
Image height. |
private java.awt.Image |
image
Image data. |
private java.awt.image.DirectColorModel |
model
Direct color model (32 bits). |
private int |
width
Image width. |
Constructor Summary | |
---|---|
FastImage(int w,
int h)
Construct a FastImage . |
Method Summary | |
---|---|
void |
addConsumer(java.awt.image.ImageConsumer ic)
Registers an ImageConsumer with the ImageProducer for access to the image data during a later reconstruction of the Image. |
boolean |
isConsumer(java.awt.image.ImageConsumer ic)
Check if consumer is already registered. |
void |
paint(java.awt.Graphics g,
int xOffset,
int yOffset,
int xScale,
int yScale)
Paint the FastImage . |
void |
paint(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3,
int x4,
int y4)
Paint the FastImage . |
void |
removeConsumer(java.awt.image.ImageConsumer ic)
Does nothing. |
void |
requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)
Does nothing. |
void |
startProduction(java.awt.image.ImageConsumer ic)
Registers the specified ImageConsumer object as a consumer and starts an immediate reconstruction of the image data which will then be delivered to this consumer and any other consumer which might have already been registered with the producer. |
void |
update(int[] pixels,
int offset)
Update the FastImage with new pixel data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int width
private int height
private java.awt.Image image
private java.awt.image.ImageConsumer consumer
private java.awt.image.DirectColorModel model
Constructor Detail |
---|
public FastImage(int w, int h)
FastImage
.
w
- Width of Imageh
- Height of ImageMethod Detail |
---|
public void update(int[] pixels, int offset)
pixels
- pixel array.offset
- offset into pixel array.public void paint(java.awt.Graphics g, int xOffset, int yOffset, int xScale, int yScale)
FastImage
.
g
- graphics contextxOffset
- X Offset at which to paint image atyOffset
- Y Offset at which to paint image atxScale
- X Scale FactoryScale
- Y Scale Factorpublic void paint(java.awt.Graphics g, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
FastImage
.
g
- Graphics contextx1
- Destination top left cornery1
- Destination top left cornerx2
- Destination bottom right cornery2
- Destination bottom right cornerx3
- Source top left cornery3
- Source top left cornerx4
- Source bottom right cornery4
- Source bottom right cornerpublic void addConsumer(java.awt.image.ImageConsumer ic)
addConsumer
in interface java.awt.image.ImageProducer
ic
- the specified ImageConsumerpublic boolean isConsumer(java.awt.image.ImageConsumer ic)
isConsumer
in interface java.awt.image.ImageProducer
ic
- an instance of ImageConsumer
.
public void startProduction(java.awt.image.ImageConsumer ic)
startProduction
in interface java.awt.image.ImageProducer
ic
- the specified ImageConsumerpublic void removeConsumer(java.awt.image.ImageConsumer ic)
removeConsumer
in interface java.awt.image.ImageProducer
ic
- an instance of ImageConsumer
.public void requestTopDownLeftRightResend(java.awt.image.ImageConsumer ic)
requestTopDownLeftRightResend
in interface java.awt.image.ImageProducer
ic
- an instance of ImageConsumer
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |