private Rectangle2D.Float setMovingRect(float[] a, int x, int y) {
		switch (selectedSpot) {
		case LOWER_LEFT:
		case LOWER_RIGHT:
		case UPPER_LEFT:
		case UPPER_RIGHT:
			a[0] = Math.min(x, anchorPoint.x);
			a[1] = Math.min(y, anchorPoint.y);
			a[2] = Math.abs(x - anchorPoint.x);
			a[3] = Math.abs(y - anchorPoint.y);
			break;
		case TOP:
		case BOTTOM:
			a[1] = Math.min(y, anchorPoint.y);
			a[3] = Math.abs(y - anchorPoint.y);
			break;
		case LEFT:
		case RIGHT:
			a[0] = Math.min(x, anchorPoint.x);
			a[2] = Math.abs(x - anchorPoint.x);
			break;
		}
		return new Rectangle2D.Float(a[0], a[1], a[2], a[3]);
	}