Have you considered not using a BufferedImage, and instead
over-riding the paint() method of a Component? You could
easily extend something like JPanel, over-ride it's paint
method, and use the Java2D rendering calls to do the drawing
of the plot. For zoom, simply clip the area as apporpriate
and scale using an AffineTransform.
....or is this completely out of left field, Java2D gurus? ;-)
-Yawar
-----Original Message-----
From: Somogyi Csongor [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 04, 1999 4:09 AM
To: [EMAIL PROTECTED]
Subject: [JAVA2D] resizing image in a canvas
Hello,
I am looking for solution to the following problem:
I would like to plot graphs and I thought that I would use Java2D. My
idea
is to create a BufferedImage, in which I will draw, and drop it into a
canvas (JPanel or so) and drop this into a ScrollPane. However if I
would
like to zoom graphs then accordingly with resizing the Java2D shapes I
have to modify the size of the BufferedImage as well. This would lead to
create a new BufferedImage in every zooming steps.
Could you give me some better solution to my problem? I found a solution
in JAI but it is not part of the standard Java 2 API at the moment
therefore I would like to omit.
Thanks,
Csongor
========================================================================
===
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".
===========================================================================
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".