Package popinjay

Class AffineTransform


  • public class AffineTransform
    extends java.lang.Object
    A mutable affine transformation on 2D points.
    • Constructor Summary

      Constructors 
      Constructor Description
      AffineTransform()
      Create the identity transformation.
      AffineTransform​(int m00, int m01, int m10, int m11)
      Create a linear transformation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Point apply​(Point p)
      Return a point that is the transformation of p.
      void compose​(AffineTransform t)
      Effect: compose the current transformation with the transformation t.
      void translate​(int dx, int dy)
      Effect: Compose the current transformation with a translation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AffineTransform

        public AffineTransform()
        Create the identity transformation.
      • AffineTransform

        public AffineTransform​(int m00,
                               int m01,
                               int m10,
                               int m11)
        Create a linear transformation.
    • Method Detail

      • translate

        public void translate​(int dx,
                              int dy)
        Effect: Compose the current transformation with a translation.
      • compose

        public void compose​(AffineTransform t)
        Effect: compose the current transformation with the transformation t.
      • apply

        public Point apply​(Point p)
        Return a point that is the transformation of p.