/** Make a smaller Rectangle and use it to locate the cursor relative to the Rectangle center. */ private int getOutcode(Point p) { Rectangle r = (Rectangle) cropping.clip.clone(); r.grow(-PROX_DIST, -PROX_DIST); return r.outcode(p.x, p.y); }