summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp')
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp43
1 files changed, 20 insertions, 23 deletions
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp
index e1ee168e72..72738cd8d9 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp
@@ -23,30 +23,27 @@
#include "../barcode.h"
#include "../BC_ResultPoint.h"
#include "BC_QRAlignmentPattern.h"
-CBC_QRAlignmentPattern::CBC_QRAlignmentPattern(FX_FLOAT posX, FX_FLOAT posY, FX_FLOAT estimateModuleSize):
- CBC_ResultPoint(posX, posY), m_moduleSize(estimateModuleSize)
-{
+CBC_QRAlignmentPattern::CBC_QRAlignmentPattern(FX_FLOAT posX,
+ FX_FLOAT posY,
+ FX_FLOAT estimateModuleSize)
+ : CBC_ResultPoint(posX, posY), m_moduleSize(estimateModuleSize) {}
+CBC_QRAlignmentPattern::~CBC_QRAlignmentPattern() {}
+FX_FLOAT CBC_QRAlignmentPattern::GetX() {
+ return m_x;
}
-CBC_QRAlignmentPattern::~CBC_QRAlignmentPattern()
-{
+FX_FLOAT CBC_QRAlignmentPattern::GetY() {
+ return m_y;
}
-FX_FLOAT CBC_QRAlignmentPattern::GetX()
-{
- return m_x;
+FX_BOOL CBC_QRAlignmentPattern::AboutEquals(FX_FLOAT moduleSize,
+ FX_FLOAT i,
+ FX_FLOAT j) {
+ if ((FXSYS_fabs(i - GetY()) <= moduleSize) &&
+ (FXSYS_fabs(j - GetX()) <= moduleSize)) {
+ FX_FLOAT moduleSizeDiff = FXSYS_fabs(moduleSize - m_moduleSize);
+ return (moduleSizeDiff <= 1.0f) || (moduleSizeDiff / m_moduleSize <= 1.0f);
+ }
+ return FALSE;
}
-FX_FLOAT CBC_QRAlignmentPattern::GetY()
-{
- return m_y;
-}
-FX_BOOL CBC_QRAlignmentPattern::AboutEquals(FX_FLOAT moduleSize, FX_FLOAT i, FX_FLOAT j)
-{
- if ((FXSYS_fabs(i - GetY()) <= moduleSize) && (FXSYS_fabs(j - GetX()) <= moduleSize)) {
- FX_FLOAT moduleSizeDiff = FXSYS_fabs(moduleSize - m_moduleSize);
- return (moduleSizeDiff <= 1.0f) || (moduleSizeDiff / m_moduleSize <= 1.0f);
- }
- return FALSE;
-}
-CBC_QRAlignmentPattern *CBC_QRAlignmentPattern::Clone()
-{
- return FX_NEW CBC_QRAlignmentPattern(m_x, m_y, m_moduleSize);
+CBC_QRAlignmentPattern* CBC_QRAlignmentPattern::Clone() {
+ return FX_NEW CBC_QRAlignmentPattern(m_x, m_y, m_moduleSize);
}