2 Replies Latest reply on Mar 16, 2008 1:35 AM by 800351

    Question about double buffering and pixelgrabber

      I created a java applet that uses double buffering identical to http://www.realapplets.com/tutorial/DoubleBuffering.html

      including the
      Image offscreen;
      declaration. Everything works fine and the graphics appear perfectly in the applet.

      Now, I have implemented a pixelGrabber from http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/PixelGrabber.html

      and I use the pixelGrabber to read the pixel color values from the Image offscreen. However, I note that even though the pixelGrabber works and reads the image pixels, ever single pixel of offscreen is the RGB color of the background color, and not the rest of the graphics drawn on top of it, with a series of drawRect, drawOval, drawLine, etc. commands. The graphics appear in the applet perfectly though.

      Any idea why the pixels read from offscreen are not conforming to the image drawn on the screen with