int w = (int) (lensWidth/f); xTopCorner = p.x-w; yTopCorner = p.y-w; BufferedImage img = ImageFactory.getImage(displayImage, xTopCorner, yTopCorner, w, w, painting, c); lensImage = itMng.buildDisplayImage(img, f);
int w = (int) (lensWidth/(2*f)); xTopCorner = p.x-ViewerUIF.START-w; yTopCorner = p.y-ViewerUIF.START-w; int x = (int) ((p.x-ViewerUIF.START)*f)-lensWidth/2; int y = (int) ((p.y-ViewerUIF.START)*f)-lensWidth/2; BufferedImage img = itMng.buildDisplayImage(displayImage, f); lensImage = ImageFactory.getImage(img, x,  y, lensWidth, lensWidth, painting, c);
    void paintLensImage(double f, Point p, int lensWidth, boolean painting,                         Color c)    {        xLens = p.x-lensWidth/2;        yLens = p.y-lensWidth/2;                int w = (int) (lensWidth/f);        xTopCorner = p.x-w;        yTopCorner = p.y-w;        BufferedImage img = ImageFactory.getImage(displayImage, xTopCorner,                                             yTopCorner, w, w, painting, c);        lensImage = itMng.buildDisplayImage(img, f);        repaint();    }