Hi Charlemagne,

>             af.setToTranslation( x, y );
>         }
>         af.setToScale( zoomRatio, zoomRatio );

These methods each erase the prior contents of the af object and
set it to the indicated transformation only.  They are equivalent
to calling "af.setToIdentity()" just before them.  The second
method cancels out the first which could just as well be deleted
without affecting anything.  Perhaps you meant to use the "scale()"
method here (which would concatenate a scale on top of the prior
translate).

>             af.translate( x, y );

This method, which appears later, concatenates a translation with
the existing transform of the af object.

The setTo... methods reset the transform and replace it whereas the
translate,rotate,scale,etc. methods accumulate into the existing
transformations (in a last-invoked-first-applied order)...

                                ...jim

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/

Reply via email to