Changed the order of the BaseMonochromeBitmapSource constructor arguments to be width...
[zxing.git] / android / src / com / google / zxing / client / android / YUVMonochromeBitmapSource.java
index 6e9295e..8aad467 100755 (executable)
@@ -34,8 +34,6 @@ public final class YUVMonochromeBitmapSource extends BaseMonochromeBitmapSource
   private final int mDataWidth;
   private final int mCropTop;
   private final int mCropLeft;
-  private final int mCropBottom;
-  private final int mCropRight;
 
   /**
    * Builds an object around a YUV buffer from the camera. The image is not cropped.
@@ -80,6 +78,7 @@ public final class YUVMonochromeBitmapSource extends BaseMonochromeBitmapSource
                                    int cropLeft,
                                    int cropBottom,
                                    int cropRight) {
+    super(cropRight - cropLeft, cropBottom - cropTop);
     if (cropRight - cropLeft > dataWidth || cropBottom - cropTop > dataHeight) {
       throw new IllegalArgumentException();
     }
@@ -87,18 +86,6 @@ public final class YUVMonochromeBitmapSource extends BaseMonochromeBitmapSource
     mDataWidth = dataWidth;
     this.mCropTop = cropTop;
     this.mCropLeft = cropLeft;
-    this.mCropBottom = cropBottom;
-    this.mCropRight = cropRight;
-  }
-
-  @Override
-  public int getHeight() {
-    return mCropBottom - mCropTop;
-  }
-
-  @Override
-  public int getWidth() {
-    return mCropRight - mCropLeft;
   }
 
   /**