> (1)Does Java's Graphics provide some strategy for skewing (or perspective
> transformation)?

The 2D API supports only affine transformations which preserve the parallel
property of lines.  It can be defined generally by a 2x3 matrix.

Perspective transforms can transform parallel lines into non-parallel
lines.  A perspective transform requires a 3x3 matrix for a complete
definition.

> (2)Another question is that whether AffineTransform class can be used to
> realize "zoom in" and "zoom out" function? (Changing "1" in the matrix
> to other overall scalling).

The AffineTransform class has a scale method for performing just this
operation.  The Graphics2D class has a utility method for scaling its
built-in transform also.  See:

        java.awt.geom.AffineTransform.scale(double scalex, double scaley);
        java.awt.Graphics2D.scale(double scalex, double scaley);

in the class documentation.

                                ...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