package com.google.zxing.qrcode.detector;\r
\r
import com.google.zxing.ReaderException;\r
+import com.google.zxing.ResultPoint;\r
+import com.google.zxing.ResultPointCallback;\r
import com.google.zxing.common.BitMatrix;\r
\r
import java.util.Vector;\r
private final int height;\r
private final float moduleSize;\r
private final int[] crossCheckStateCount;\r
+ private final ResultPointCallback resultPointCallback;\r
\r
/**\r
* <p>Creates a finder that will look in a portion of the whole image.</p>\r
int startY,\r
int width,\r
int height,\r
- float moduleSize) {\r
+ float moduleSize,\r
+ ResultPointCallback resultPointCallback) {\r
this.image = image;\r
this.possibleCenters = new Vector(5);\r
this.startX = startX;\r
this.height = height;\r
this.moduleSize = moduleSize;\r
this.crossCheckStateCount = new int[3];\r
+ this.resultPointCallback = resultPointCallback;\r
}\r
\r
/**\r
}\r
}\r
// Hadn't found this before; save it\r
- possibleCenters.addElement(new AlignmentPattern(centerJ, centerI, estimatedModuleSize));\r
+ ResultPoint point = new AlignmentPattern(centerJ, centerI, estimatedModuleSize);\r
+ possibleCenters.addElement(point);\r
+ if (resultPointCallback != null) {\r
+ resultPointCallback.foundPossibleResultPoint(point);\r
+ }\r
}\r
return null;\r
}\r