diff options
Diffstat (limited to 'xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp')
-rw-r--r-- | xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp index ed751cc4ba..a880317ee0 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417Reader.cpp @@ -57,16 +57,16 @@ CBC_PDF417Reader::CBC_PDF417Reader() CBC_PDF417Reader::~CBC_PDF417Reader()
{
}
-CFX_ByteString CBC_PDF417Reader::Decode(CBC_BinaryBitmap *image, FX_INT32 &e)
+CFX_ByteString CBC_PDF417Reader::Decode(CBC_BinaryBitmap *image, int32_t &e)
{
return Decode(image, 0, e);
}
-CFX_ByteString CBC_PDF417Reader::Decode(CBC_BinaryBitmap *image, FX_BOOL multiple, FX_INT32 hints, FX_INT32 &e)
+CFX_ByteString CBC_PDF417Reader::Decode(CBC_BinaryBitmap *image, FX_BOOL multiple, int32_t hints, int32_t &e)
{
CFX_ByteString results;
CBC_PDF417DetectorResult* detectorResult = CBC_Detector::detect(image, hints, multiple, e);
BC_EXCEPTION_CHECK_ReturnValue(e, "");
- for (FX_INT32 i = 0; i < detectorResult->getPoints()->GetSize(); i++) {
+ for (int32_t i = 0; i < detectorResult->getPoints()->GetSize(); i++) {
CFX_PtrArray* points = (CFX_PtrArray*)detectorResult->getPoints()->GetAt(i);
CBC_CommonDecoderResult* ResultTemp = CBC_PDF417ScanningDecoder::decode(detectorResult->getBits(), (CBC_ResultPoint*)points->GetAt(4), (CBC_ResultPoint*)points->GetAt(5),
(CBC_ResultPoint*)points->GetAt(6), (CBC_ResultPoint*)points->GetAt(7), getMinCodewordWidth(*points), getMaxCodewordWidth(*points), e);
@@ -81,39 +81,39 @@ CFX_ByteString CBC_PDF417Reader::Decode(CBC_BinaryBitmap *image, FX_BOOL multipl delete detectorResult;
return results;
}
-CFX_ByteString CBC_PDF417Reader::Decode(CBC_BinaryBitmap *image, FX_INT32 hints, FX_INT32 &e)
+CFX_ByteString CBC_PDF417Reader::Decode(CBC_BinaryBitmap *image, int32_t hints, int32_t &e)
{
CFX_ByteString bs = Decode(image, FALSE, 0, e);
BC_EXCEPTION_CHECK_ReturnValue(e, "");
return bs;
}
-FX_INT32 CBC_PDF417Reader::getMaxWidth(CBC_ResultPoint* p1, CBC_ResultPoint* p2)
+int32_t CBC_PDF417Reader::getMaxWidth(CBC_ResultPoint* p1, CBC_ResultPoint* p2)
{
if (p1 == NULL || p2 == NULL) {
return 0;
}
- return (FX_INT32) FXSYS_fabs(p1->GetX() - p2->GetX());
+ return (int32_t) FXSYS_fabs(p1->GetX() - p2->GetX());
}
-FX_INT32 CBC_PDF417Reader::getMinWidth(CBC_ResultPoint* p1, CBC_ResultPoint* p2)
+int32_t CBC_PDF417Reader::getMinWidth(CBC_ResultPoint* p1, CBC_ResultPoint* p2)
{
if (p1 == NULL || p2 == NULL) {
return Integer_MAX_VALUE;
}
- return (FX_INT32) FXSYS_fabs(p1->GetX() - p2->GetX());
+ return (int32_t) FXSYS_fabs(p1->GetX() - p2->GetX());
}
-FX_INT32 CBC_PDF417Reader::getMaxCodewordWidth(CFX_PtrArray& p)
+int32_t CBC_PDF417Reader::getMaxCodewordWidth(CFX_PtrArray& p)
{
- FX_INT32 a = getMaxWidth((CBC_ResultPoint*)p.GetAt(6), (CBC_ResultPoint*)p.GetAt(2)) * CBC_PDF417Common::MODULES_IN_CODEWORD / CBC_PDF417Common::MODULES_IN_STOP_PATTERN;
- FX_INT32 b = getMaxWidth((CBC_ResultPoint*)p.GetAt(7), (CBC_ResultPoint*)p.GetAt(3)) * CBC_PDF417Common::MODULES_IN_CODEWORD / CBC_PDF417Common::MODULES_IN_STOP_PATTERN;
- FX_INT32 c = getMaxWidth((CBC_ResultPoint*)p.GetAt(0), (CBC_ResultPoint*)p.GetAt(4)) < a ? getMaxWidth((CBC_ResultPoint*)p.GetAt(0), (CBC_ResultPoint*)p.GetAt(4)) : a;
- FX_INT32 d = getMaxWidth((CBC_ResultPoint*)p.GetAt(1), (CBC_ResultPoint*)p.GetAt(5)) < b ? getMaxWidth((CBC_ResultPoint*)p.GetAt(1), (CBC_ResultPoint*)p.GetAt(5)) : b;
+ int32_t a = getMaxWidth((CBC_ResultPoint*)p.GetAt(6), (CBC_ResultPoint*)p.GetAt(2)) * CBC_PDF417Common::MODULES_IN_CODEWORD / CBC_PDF417Common::MODULES_IN_STOP_PATTERN;
+ int32_t b = getMaxWidth((CBC_ResultPoint*)p.GetAt(7), (CBC_ResultPoint*)p.GetAt(3)) * CBC_PDF417Common::MODULES_IN_CODEWORD / CBC_PDF417Common::MODULES_IN_STOP_PATTERN;
+ int32_t c = getMaxWidth((CBC_ResultPoint*)p.GetAt(0), (CBC_ResultPoint*)p.GetAt(4)) < a ? getMaxWidth((CBC_ResultPoint*)p.GetAt(0), (CBC_ResultPoint*)p.GetAt(4)) : a;
+ int32_t d = getMaxWidth((CBC_ResultPoint*)p.GetAt(1), (CBC_ResultPoint*)p.GetAt(5)) < b ? getMaxWidth((CBC_ResultPoint*)p.GetAt(1), (CBC_ResultPoint*)p.GetAt(5)) : b;
return c < d ? c : d;
}
-FX_INT32 CBC_PDF417Reader::getMinCodewordWidth(CFX_PtrArray& p)
+int32_t CBC_PDF417Reader::getMinCodewordWidth(CFX_PtrArray& p)
{
- FX_INT32 a = getMinWidth((CBC_ResultPoint*)p.GetAt(6), (CBC_ResultPoint*)p.GetAt(2)) * CBC_PDF417Common::MODULES_IN_CODEWORD / CBC_PDF417Common::MODULES_IN_STOP_PATTERN;
- FX_INT32 b = getMinWidth((CBC_ResultPoint*)p.GetAt(7), (CBC_ResultPoint*)p.GetAt(3)) * CBC_PDF417Common::MODULES_IN_CODEWORD / CBC_PDF417Common::MODULES_IN_STOP_PATTERN;
- FX_INT32 c = getMinWidth((CBC_ResultPoint*)p.GetAt(0), (CBC_ResultPoint*)p.GetAt(4)) < a ? getMinWidth((CBC_ResultPoint*)p.GetAt(0), (CBC_ResultPoint*)p.GetAt(4)) : a;
- FX_INT32 d = getMinWidth((CBC_ResultPoint*)p.GetAt(1), (CBC_ResultPoint*)p.GetAt(5)) < b ? getMinWidth((CBC_ResultPoint*)p.GetAt(1), (CBC_ResultPoint*)p.GetAt(5)) : b;
+ int32_t a = getMinWidth((CBC_ResultPoint*)p.GetAt(6), (CBC_ResultPoint*)p.GetAt(2)) * CBC_PDF417Common::MODULES_IN_CODEWORD / CBC_PDF417Common::MODULES_IN_STOP_PATTERN;
+ int32_t b = getMinWidth((CBC_ResultPoint*)p.GetAt(7), (CBC_ResultPoint*)p.GetAt(3)) * CBC_PDF417Common::MODULES_IN_CODEWORD / CBC_PDF417Common::MODULES_IN_STOP_PATTERN;
+ int32_t c = getMinWidth((CBC_ResultPoint*)p.GetAt(0), (CBC_ResultPoint*)p.GetAt(4)) < a ? getMinWidth((CBC_ResultPoint*)p.GetAt(0), (CBC_ResultPoint*)p.GetAt(4)) : a;
+ int32_t d = getMinWidth((CBC_ResultPoint*)p.GetAt(1), (CBC_ResultPoint*)p.GetAt(5)) < b ? getMinWidth((CBC_ResultPoint*)p.GetAt(1), (CBC_ResultPoint*)p.GetAt(5)) : b;
return c < d ? c : d;
}
|