- int px_size = getWidth();
- if (0 <= pt.x && pt.x < px_size) {
- if (0 <= pt.y && pt.y < px_size) {
- int dx = 500, dy = 250;
- if (state.state > 2) {
- dx = Math.min(200, 20 + (int) Math.abs(last_pt.x - pt.x));
- dy = Math.min(100, 10 + (int) Math.abs(last_pt.y - pt.y));
- }
- Rectangle r = new Rectangle((int)pt.x-dx, (int)pt.y-dy,
- dx*2, dy*2);
- scrollRectToVisible(r);
- }
- }
-