/* 257 */ QDPoint[] arrayOfQDPoint = new QDPoint[1];
/* 258 */ arrayOfQDPoint[0] = new QDPoint(paramMouseEvent.getX(), paramMouseEvent.getY());
/* 259 */ this.invSpaceMatrix.transformPoints(arrayOfQDPoint);
/* 260 */ int j = arrayOfQDPoint[0].getX() - this.origPt[0].getX();
/* 261 */ int k = arrayOfQDPoint[0].getY() - this.origPt[0].getY();
/* 262 */ Matrix localMatrix = this.origTargetMatrix.copy();
/* 263 */ localMatrix.translate(j, k);
/* */
/* 265 */ QDDimension localQDDimension = this.target.getOriginalSize();
/* 266 */ int m = localQDDimension.getWidth();
/* 267 */ int n = localQDDimension.getHeight();
/* 268 */ float f1 = localMatrix.getTx();
/* 269 */ float f2 = localMatrix.getTy();
/* 270 */ int i1 = this.spaceRect.getX();
/* 271 */ int i2 = this.spaceRect.getWidth() - m;
/* 272 */ int i3 = this.spaceRect.getY();
/* 273 */ int i4 = this.spaceRect.getHeight() - n;
/* */
/* 275 */ int i5 = localMatrix.getType();
/* 276 */ switch (i5) {
/* */ case 0:
/* */ case 1:
/* 279 */ break;
/* */ default:
/* 283 */ QDRect localQDRect = new QDRect(0, 0, m, n);
/* 284 */ localMatrix.transformRect(localQDRect);
/* 285 */ m = localQDRect.getWidth();
/* 286 */ n = localQDRect.getHeight();
/* 287 */ i1 = (int)(localMatrix.getTx() - localQDRect.getX() + 0.5F);
/* 288 */ f1 -= i1;
/* 289 */ i3 = (int)(localMatrix.getTy() - localQDRect.getY() + 0.5F);
/* 290 */ f2 -= i3;
/* 291 */ i4 = this.spaceRect.getHeight() - n + i3;
/* 292 */ i2 = this.spaceRect.getWidth() - m + i1;
/* */ }
/* */
/* 297 */ if (f1 < this.spaceRect.getX()) {
/* 298 */ if ((this.constrained & 0x1) != 0) {
/* 299 */ localMatrix.setTx(i1);
/* 300 */ i = 1;
/* 301 */ } else if (f1 <= -m) {
/* 302 */ localMatrix.setTx(-m + this.xBufferIfUnConstrained + i1);
/* 303 */ i = 1;
/* */ }
/* 305 */ } else if (f1 + m > this.spaceRect.getWidth()) {
/* 306 */ if ((this.constrained & 0x10) != 0) {
/* 307 */ localMatrix.setTx(i2);
/* 308 */ i = 1;
/* 309 */ } else if (f1 >= this.spaceRect.getWidth()) {
/* 310 */ localMatrix.setTx(i2 + m - this.xBufferIfUnConstrained);
/* 311 */ i = 1;
/* */ }
/* */ }
/* */
/* 315 */ if (f2 < this.spaceRect.getY()) {
/* 316 */ if ((this.constrained & 0x100) != 0) {
/* 317 */ localMatrix.setTy(i3);
/* 318 */ i = 1;
/* 319 */ } else if (f2 <= -n) {
/* 320 */ localMatrix.setTy(-n + this.yBufferIfUnConstrained + i3);
/* 321 */ i = 1;
/* */ }
/* 323 */ } else if (f2 + n > this.spaceRect.getHeight()) {
/* 324 */ if ((this.constrained & 0x1000) != 0) {
/* 325 */ localMatrix.setTy(i4);
/* 326 */ i = 1;
/* 327 */ } else if (f2 >= this.spaceRect.getHeight()) {
/* 328 */ localMatrix.setTy(i4 + n - this.yBufferIfUnConstrained);
/* 329 */ i = 1;
/* */ }
/* */ }
/* */
/* 333 */ this.target.setMatrix(localMatrix);