I am setting my stroke to width 0, which i think means use one pixel
line width. So this works at whatever zoom level.

        g.setStroke(new java.awt.BasicStroke(0.0f));

BasicStroke here takes user coords, so to use some other constant pixel
width, you have to calculate what the width is in user coordinates,
based on the current Affine Transform. I havent done that yet but i plan
to, and expect thats how to do it.


> -----Original Message-----
> From: Discussion list for Java 2D API
> [mailto:[EMAIL PROTECTED]]On Behalf Of Tolga Sakman
> Sent: Wednesday, November 03, 1999 11:57 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA2D] zooming in & out
>
>
> Hello All,
>
> I've got a canvas (subclass of JComponent) which has x&y
> axes, and some 2D
> geometry on it (several shapes). When I select my zoom tool
> and select a
> rectangular portion of it, I want to see the magnified canvas
> with the exact
> view that was in that zoom screen, with the line thicknesses
> not magnified.
> Needless to say, I also need to be able to go back to my
> previous view (zoom
> out). I tried to use scale(x,y) but does not really do it.
> Any suggestions / related experiences are mostly appreciated.
>
> Tolga
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Tolga Sakman
> Project Engineer
>
> Analytic & Computational Research, Inc. -- ACRi
> Cincinnati, OH
> Phone: 513-794-0888
> Fax: 513-794-9779
> [EMAIL PROTECTED]
>
> ==============================================================
> =============
> 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".

Reply via email to