The Java Developers Almanac 1.4


Order this book from Amazon.

   
Home > List of Packages > java.awt.geom  [4 examples]

e659. Scaling, Shearing, Translating, and Rotating a Shape

    AffineTransform tx = new AffineTransform();
    tx.scale(scalex, scaley);
    tx.shear(shiftx, shifty);
    tx.translate(x, y);
    tx.rotate(radians);
    Shape newShape = tx.createTransformedShape(shape);

 Related Examples
e656. Creating Basic Shapes
e657. Creating a Shape Using Lines and Curves
e658. Combining Shapes


© 2002 Addison-Wesley.