[3342] in java-interest
Re: ImageProducer/Consumer classes
daemon@ATHENA.MIT.EDU (Jim Graham)
Wed Nov 8 04:57:37 1995
Date: Wed, 8 Nov 1995 00:05:13 -0800
From: flar@bendenweyr.Eng.Sun.COM (Jim Graham)
To: dgourley@cs.berkeley.edu, java-interest@java.Eng.Sun.COM
Hi David,
> A slight update to my previous question, I realized that the ImageObserver
> was the Component(duh). I have set up my ImageProducer and can see that
> ImageConsumers are attaching themselves to my producer, I loop thru and
> per-frame call setPixels(blah...) and imageComplete(SINGLEFRAMEDONE),
> however, since nothing is displayed I can only assume that I also need to
> explicitly draw the image for each frame.
Someone (or somethread) must draw it. When a new frame is ready, the
ImageConsumer whose job it is to dither the data for the screen should
notify any ImageObservers that have been specified in recent drawImage's
If you use your Component (i.e. your Applet) as the ImageObserver
parameter to the drawImage then it will be notified of FRAMEBITS when
a frame is done and the default action it will take is to repaint the
component.
> I have tried to call drawImage each loop but to no avail... Any ideas?
No. Where are you getting the graphics object to do the drawImage from?
There could be any number of problems but it is hard to tell without
an example.
...jim
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com