/*     */ public void applyTo(PerspectiveTransform paramPerspectiveTransform) {
   /*  23 */ int i = this.__set;
   /*  24 */ while (i != 0) {
     /*  25 */ int j = Integer.numberOfTrailingZeros(i);
     /*  26 */ i &= (1 << j ^ 0xFFFFFFFF);
     /*  27 */ switch (j) {
       case 0:
         /*  28 */ paramPerspectiveTransform.setInput(this.input);
         break;
         /*     */ case 1:
         /*  29 */ paramPerspectiveTransform.setLlx(this.llx);
         break;
         /*     */ case 2:
         /*  30 */ paramPerspectiveTransform.setLly(this.lly);
         break;
         /*     */ case 3:
         /*  31 */ paramPerspectiveTransform.setLrx(this.lrx);
         break;
         /*     */ case 4:
         /*  32 */ paramPerspectiveTransform.setLry(this.lry);
         break;
         /*     */ case 5:
         /*  33 */ paramPerspectiveTransform.setUlx(this.ulx);
         break;
         /*     */ case 6:
         /*  34 */ paramPerspectiveTransform.setUly(this.uly);
         break;
         /*     */ case 7:
         /*  35 */ paramPerspectiveTransform.setUrx(this.urx);
         break;
         /*     */ case 8:
         /*  36 */ paramPerspectiveTransform.setUry(this.ury);
         /*     */ }
     /*     */ }
   /*     */ }
예제 #2
0
  public final BitMatrix sampleGrid(
      BitMatrix bitmatrix, int i, int j, PerspectiveTransform perspectivetransform)
      throws NotFoundException {
    if (i <= 0 || j <= 0) {
      throw NotFoundException.getNotFoundInstance();
    }
    BitMatrix bitmatrix1 = new BitMatrix(i, j);
    float af[] = new float[i << 1];
    for (i = 0; i < j; i++) {
      int i1 = af.length;
      float f = i;
      for (int k = 0; k < i1; k += 2) {
        af[k] = (float) (k >> 1) + 0.5F;
        af[k + 1] = f + 0.5F;
      }

      perspectivetransform.transformPoints(af);
      checkAndNudgePoints(bitmatrix, af);
      int l = 0;
      while (l < i1) {
        try {
          if (bitmatrix.get((int) af[l], (int) af[l + 1])) {
            bitmatrix1.set(l >> 1, i);
          }
        }
        // Misplaced declaration of an exception variable
        catch (BitMatrix bitmatrix) {
          throw NotFoundException.getNotFoundInstance();
        }
        l += 2;
      }
    }

    return bitmatrix1;
  }
예제 #3
0
 public final BitMatrix sampleGrid(
     BitMatrix bitmatrix,
     int i,
     int j,
     float f,
     float f1,
     float f2,
     float f3,
     float f4,
     float f5,
     float f6,
     float f7,
     float f8,
     float f9,
     float f10,
     float f11,
     float f12,
     float f13,
     float f14,
     float f15)
     throws NotFoundException {
   return sampleGrid(
       bitmatrix,
       i,
       j,
       PerspectiveTransform.quadrilateralToQuadrilateral(
           f, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15));
 }
예제 #4
0
  public static PerspectiveTransform quadrilateralToQuadrilateral(
      float x0,
      float y0,
      float x1,
      float y1,
      float x2,
      float y2,
      float x3,
      float y3,
      float x0p,
      float y0p,
      float x1p,
      float y1p,
      float x2p,
      float y2p,
      float x3p,
      float y3p) {

    PerspectiveTransform qToS = quadrilateralToSquare(x0, y0, x1, y1, x2, y2, x3, y3);
    PerspectiveTransform sToQ = squareToQuadrilateral(x0p, y0p, x1p, y1p, x2p, y2p, x3p, y3p);
    return sToQ.times(qToS);
  }