Hello Sean,
On Sat, Sep 09, 2000 at 05:57:0p +0930, Sean wrote:
> Hello,
>
> I have an application which manipulates bufferedimages. Once i have drawn to
> the off-screen buffer, how do i then display the buffer to the screen (in an
> application) ?
You would need to get a Graphics object and use a drawImage method for
rendering the image.
You would either have something like
public void paint(Graphics g) {
BufferedImage bufferedImage;
// create bufferedImage and render to it
...
// render bufferedImage to the screen
g.drawImage(bufferedImage, 0, 0, null);
}
or
BufferedImage bufferedImage;
// create bufferedImage and render to it
...
// get a Graphics object from the component on the screen
// you want to render to
Graphics g = component.getGraphics();
// render bufferedImage to the screen
g.drawImage(bufferedImage, 0, 0, null);
See API docs for more complete description of Graphics.drawImage.
Also you can take a look at the demos shipped with Java SDK.
Thank you,
Dmitri
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".