if (py > imageRect.y + imageRect.height - 1) { py = imageRect.y + imageRect.height - 1;
if (py > currentRect.y + currentRect.height - 1) { py = currentRect.y + currentRect.height - 1;
		public Point2D validate(Point2D p) {			double px = p.getX();			double py = p.getY();			if (px < imageRect.x) {				px = imageRect.x;			}			if (py < imageRect.y) {				py = imageRect.y;			}			if (px > imageRect.x + imageRect.width - 1) {				px = imageRect.x + imageRect.width - 1;			}			if (py > imageRect.y + imageRect.height - 1) {				py = imageRect.y + imageRect.height - 1;			}			return new Point2D.Double(px, py);		}