public static Point inverseTransformPoint(AffineTransform af,Point pt){
  Point2D src=new Point2D.Float(pt.x,pt.y);
  try {
    Point2D dest=af.inverseTransform(src,null);
    return new Point((int)Math.floor(dest.getX()),(int)Math.floor(dest.getY()));
  }
 catch (  Exception e) {
    e.printStackTrace();
    return new Point(0,0);
  }
}

public static Point inverseTransformPoint ( AffineTransform af , Point pt ) { Point2D src = new Point2D . Float ( pt . x , pt . y ) ; try { Point2D dest = af . inverseTransform ( src , null ) ; return new Point ( ( int ) Math . floor ( dest . getX ( ) ) , ( int ) Math . floor ( dest . getY ( ) ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; return new Point ( 0 , 0 ) ; } }
given an arbitrary point , get the point with the inverse given transform .
