public Point2D inverseTransform(Point2D viewPoint){
  Point2D viewCenter=getViewCenter();
  double viewRadius=getViewRadius();
  double ratio=getRatio();
  double dx=viewPoint.getX() - viewCenter.getX();
  double dy=viewPoint.getY() - viewCenter.getY();
  dx*=ratio;
  Point2D pointFromCenter=new Point2D.Double(dx,dy);
  PolarPoint polar=PolarPoint.cartesianToPolar(pointFromCenter);
  double radius=polar.getRadius();
  if (radius > viewRadius)   return delegate.inverseTransform(viewPoint);
  double mag=magnification;
  radius/=mag;
  polar.setRadius(radius);
  Point2D projectedPoint=PolarPoint.polarToCartesian(polar);
  projectedPoint.setLocation(projectedPoint.getX() / ratio,projectedPoint.getY());
  Point2D translatedBack=new Point2D.Double(projectedPoint.getX() + viewCenter.getX(),projectedPoint.getY() + viewCenter.getY());
  return delegate.inverseTransform(translatedBack);
}

public Point2D inverseTransform ( Point2D viewPoint ) { Point2D viewCenter = getViewCenter ( ) ; double viewRadius = getViewRadius ( ) ; double ratio = getRatio ( ) ; double dx = viewPoint . getX ( ) - viewCenter . getX ( ) ; double dy = viewPoint . getY ( ) - viewCenter . getY ( ) ; dx *= ratio ; Point2D pointFromCenter = new Point2D . Double ( dx , dy ) ; PolarPoint polar = PolarPoint . cartesianToPolar ( pointFromCenter ) ; double radius = polar . getRadius ( ) ; if ( radius > viewRadius ) return delegate . inverseTransform ( viewPoint ) ; double mag = magnification ; radius /= mag ; polar . setRadius ( radius ) ; Point2D projectedPoint = PolarPoint . polarToCartesian ( polar ) ; projectedPoint . setLocation ( projectedPoint . getX ( ) / ratio , projectedPoint . getY ( ) ) ; Point2D translatedBack = new Point2D . Double ( projectedPoint . getX ( ) + viewCenter . getX ( ) , projectedPoint . getY ( ) + viewCenter . getY ( ) ) ; return delegate . inverseTransform ( translatedBack ) ; }
override base class to un - project the fisheye effect
