Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.h

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef _BC_QRCODERMATRIXUTIL_H_ 7 #ifndef _BC_QRCODERMATRIXUTIL_H_
8 #define _BC_QRCODERMATRIXUTIL_H_ 8 #define _BC_QRCODERMATRIXUTIL_H_
9 class CBC_CommonByteMatrix; 9 class CBC_CommonByteMatrix;
10 class CBC_QRCoderErrorCorrectionLevel; 10 class CBC_QRCoderErrorCorrectionLevel;
11 class CBC_QRCoderBitVector; 11 class CBC_QRCoderBitVector;
12 class CBC_QRCoderMatrixUtil 12 class CBC_QRCoderMatrixUtil
13 { 13 {
14 private: 14 private:
15 const static FX_INT32 POSITION_DETECTION_PATTERN[7][7]; 15 const static int32_t POSITION_DETECTION_PATTERN[7][7];
16 const static FX_INT32 VERTICAL_SEPARATION_PATTERN[7][1]; 16 const static int32_t VERTICAL_SEPARATION_PATTERN[7][1];
17 const static FX_INT32 HORIZONTAL_SEPARATION_PATTERN[1][8]; 17 const static int32_t HORIZONTAL_SEPARATION_PATTERN[1][8];
18 const static FX_INT32 POSITION_ADJUSTMENT_PATTERN[5][5]; 18 const static int32_t POSITION_ADJUSTMENT_PATTERN[5][5];
19 const static FX_INT32 POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7]; 19 const static int32_t POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7];
20 const static FX_INT32 TYPE_INFO_COORDINATES[15][2]; 20 const static int32_t TYPE_INFO_COORDINATES[15][2];
21 const static FX_INT32 VERSION_INFO_POLY; 21 const static int32_t VERSION_INFO_POLY;
22 const static FX_INT32 TYPE_INFO_POLY; 22 const static int32_t TYPE_INFO_POLY;
23 const static FX_INT32 TYPE_INFO_MASK_PATTERN; 23 const static int32_t TYPE_INFO_MASK_PATTERN;
24 public: 24 public:
25 CBC_QRCoderMatrixUtil(); 25 CBC_QRCoderMatrixUtil();
26 virtual ~CBC_QRCoderMatrixUtil(); 26 virtual ~CBC_QRCoderMatrixUtil();
27 static void ClearMatrix(CBC_CommonByteMatrix* matrix, FX_INT32 &e); 27 static void ClearMatrix(CBC_CommonByteMatrix* matrix, int32_t &e);
28 static void BuildMatrix(CBC_QRCoderBitVector* dataBits, CBC_QRCoderErrorCorr ectionLevel* ecLevel, 28 static void BuildMatrix(CBC_QRCoderBitVector* dataBits, CBC_QRCoderErrorCorr ectionLevel* ecLevel,
29 FX_INT32 version, FX_INT32 maskPattern, CBC_CommonBy teMatrix* matrix, FX_INT32 &e); 29 int32_t version, int32_t maskPattern, CBC_CommonByte Matrix* matrix, int32_t &e);
30 static void EmbedBasicPatterns(FX_INT32 version, CBC_CommonByteMatrix* matri x, FX_INT32 &e); 30 static void EmbedBasicPatterns(int32_t version, CBC_CommonByteMatrix* matrix , int32_t &e);
31 static void EmbedTypeInfo(CBC_QRCoderErrorCorrectionLevel* ecLevel, FX_INT32 maskPattern, CBC_CommonByteMatrix *matrix, FX_INT32 &e); 31 static void EmbedTypeInfo(CBC_QRCoderErrorCorrectionLevel* ecLevel, int32_t maskPattern, CBC_CommonByteMatrix *matrix, int32_t &e);
32 static void EmbedDataBits(CBC_QRCoderBitVector* dataBits, FX_INT32 maskPatte rn, CBC_CommonByteMatrix* matrix, FX_INT32 &e); 32 static void EmbedDataBits(CBC_QRCoderBitVector* dataBits, int32_t maskPatter n, CBC_CommonByteMatrix* matrix, int32_t &e);
33 static void MaybeEmbedVersionInfo(FX_INT32 version, CBC_CommonByteMatrix* ma trix, FX_INT32 &e); 33 static void MaybeEmbedVersionInfo(int32_t version, CBC_CommonByteMatrix* mat rix, int32_t &e);
34 static FX_INT32 FindMSBSet(FX_INT32 value); 34 static int32_t FindMSBSet(int32_t value);
35 static FX_INT32 CalculateBCHCode(FX_INT32 code, FX_INT32 poly); 35 static int32_t CalculateBCHCode(int32_t code, int32_t poly);
36 static void MakeTypeInfoBits(CBC_QRCoderErrorCorrectionLevel* ecLevel, FX_IN T32 maskPattern, CBC_QRCoderBitVector* bits, FX_INT32 &e); 36 static void MakeTypeInfoBits(CBC_QRCoderErrorCorrectionLevel* ecLevel, int32 _t maskPattern, CBC_QRCoderBitVector* bits, int32_t &e);
37 static void MakeVersionInfoBits(FX_INT32 version, CBC_QRCoderBitVector* bits , FX_INT32 &e); 37 static void MakeVersionInfoBits(int32_t version, CBC_QRCoderBitVector* bits, int32_t &e);
38 static FX_BOOL IsEmpty(FX_INT32 value); 38 static FX_BOOL IsEmpty(int32_t value);
39 static FX_BOOL IsValidValue(FX_INT32 value); 39 static FX_BOOL IsValidValue(int32_t value);
40 static void EmbedTimingPatterns(CBC_CommonByteMatrix* matrix, FX_INT32 &e); 40 static void EmbedTimingPatterns(CBC_CommonByteMatrix* matrix, int32_t &e);
41 static void EmbedDarkDotAtLeftBottomCorner(CBC_CommonByteMatrix* matrix, FX_ INT32 &e); 41 static void EmbedDarkDotAtLeftBottomCorner(CBC_CommonByteMatrix* matrix, int 32_t &e);
42 static void EmbedHorizontalSeparationPattern(FX_INT32 xStart, FX_INT32 yStar t, CBC_CommonByteMatrix* matrix, FX_INT32 &e); 42 static void EmbedHorizontalSeparationPattern(int32_t xStart, int32_t yStart, CBC_CommonByteMatrix* matrix, int32_t &e);
43 static void EmbedVerticalSeparationPattern(FX_INT32 xStart, FX_INT32 yStart, CBC_CommonByteMatrix* matrix, FX_INT32 &e); 43 static void EmbedVerticalSeparationPattern(int32_t xStart, int32_t yStart, C BC_CommonByteMatrix* matrix, int32_t &e);
44 static void EmbedPositionAdjustmentPattern(FX_INT32 xStart, FX_INT32 yStart, CBC_CommonByteMatrix* matrix, FX_INT32 &e); 44 static void EmbedPositionAdjustmentPattern(int32_t xStart, int32_t yStart, C BC_CommonByteMatrix* matrix, int32_t &e);
45 static void EmbedPositionDetectionPattern(FX_INT32 xStart, FX_INT32 yStart, CBC_CommonByteMatrix* matrix, FX_INT32 &e); 45 static void EmbedPositionDetectionPattern(int32_t xStart, int32_t yStart, CB C_CommonByteMatrix* matrix, int32_t &e);
46 static void EmbedPositionDetectionPatternsAndSeparators(CBC_CommonByteMatrix * matrix, FX_INT32 &e); 46 static void EmbedPositionDetectionPatternsAndSeparators(CBC_CommonByteMatrix * matrix, int32_t &e);
47 static void MaybeEmbedPositionAdjustmentPatterns(FX_INT32 version, CBC_Commo nByteMatrix* matrix, FX_INT32 &e); 47 static void MaybeEmbedPositionAdjustmentPatterns(int32_t version, CBC_Common ByteMatrix* matrix, int32_t &e);
48 }; 48 };
49 #endif 49 #endif
OLDNEW
« no previous file with comments | « xfa/src/fxbarcode/qrcode/BC_QRCoderMaskUtil.cpp ('k') | xfa/src/fxbarcode/qrcode/BC_QRCoderMatrixUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698