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

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

Issue 842043002: Organize barcode codes into modules. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 5 years, 11 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
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef _BC_QRCODERMATRIXUTIL_H_
8 #define _BC_QRCODERMATRIXUTIL_H_
9 class CBC_CommonByteMatrix;
10 class CBC_QRCoderErrorCorrectionLevel;
11 class CBC_QRCoderBitVector;
12 class CBC_QRCoderMatrixUtil;
13 class CBC_QRCoderMatrixUtil : public CFX_Object
14 {
15 private:
16 const static FX_INT32 POSITION_DETECTION_PATTERN[7][7];
17 const static FX_INT32 VERTICAL_SEPARATION_PATTERN[7][1];
18 const static FX_INT32 HORIZONTAL_SEPARATION_PATTERN[1][8];
19 const static FX_INT32 POSITION_ADJUSTMENT_PATTERN[5][5];
20 const static FX_INT32 POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[40][7];
21 const static FX_INT32 TYPE_INFO_COORDINATES[15][2];
22 const static FX_INT32 VERSION_INFO_POLY;
23 const static FX_INT32 TYPE_INFO_POLY;
24 const static FX_INT32 TYPE_INFO_MASK_PATTERN;
25 public:
26 CBC_QRCoderMatrixUtil();
27 virtual ~CBC_QRCoderMatrixUtil();
28 static void ClearMatrix(CBC_CommonByteMatrix* matrix, FX_INT32 &e);
29 static void BuildMatrix(CBC_QRCoderBitVector* dataBits, CBC_QRCoderErrorCorr ectionLevel* ecLevel,
30 FX_INT32 version, FX_INT32 maskPattern, CBC_CommonBy teMatrix* matrix, FX_INT32 &e);
31 static void EmbedBasicPatterns(FX_INT32 version, CBC_CommonByteMatrix* matri x, FX_INT32 &e);
32 static void EmbedTypeInfo(CBC_QRCoderErrorCorrectionLevel* ecLevel, FX_INT32 maskPattern, CBC_CommonByteMatrix *matrix, FX_INT32 &e);
33 static void EmbedDataBits(CBC_QRCoderBitVector* dataBits, FX_INT32 maskPatte rn, CBC_CommonByteMatrix* matrix, FX_INT32 &e);
34 static void MaybeEmbedVersionInfo(FX_INT32 version, CBC_CommonByteMatrix* ma trix, FX_INT32 &e);
35 static FX_INT32 FindMSBSet(FX_INT32 value);
36 static FX_INT32 CalculateBCHCode(FX_INT32 code, FX_INT32 poly);
37 static void MakeTypeInfoBits(CBC_QRCoderErrorCorrectionLevel* ecLevel, FX_IN T32 maskPattern, CBC_QRCoderBitVector* bits, FX_INT32 &e);
38 static void MakeVersionInfoBits(FX_INT32 version, CBC_QRCoderBitVector* bits , FX_INT32 &e);
39 static FX_BOOL IsEmpty(FX_INT32 value);
40 static FX_BOOL IsValidValue(FX_INT32 value);
41 static void EmbedTimingPatterns(CBC_CommonByteMatrix* matrix, FX_INT32 &e);
42 static void EmbedDarkDotAtLeftBottomCorner(CBC_CommonByteMatrix* matrix, FX_ INT32 &e);
43 static void EmbedHorizontalSeparationPattern(FX_INT32 xStart, FX_INT32 yStar t, CBC_CommonByteMatrix* matrix, FX_INT32 &e);
44 static void EmbedVerticalSeparationPattern(FX_INT32 xStart, FX_INT32 yStart, CBC_CommonByteMatrix* matrix, FX_INT32 &e);
45 static void EmbedPositionAdjustmentPattern(FX_INT32 xStart, FX_INT32 yStart, CBC_CommonByteMatrix* matrix, FX_INT32 &e);
46 static void EmbedPositionDetectionPattern(FX_INT32 xStart, FX_INT32 yStart, CBC_CommonByteMatrix* matrix, FX_INT32 &e);
47 static void EmbedPositionDetectionPatternsAndSeparators(CBC_CommonByteMatrix * matrix, FX_INT32 &e);
48 static void MaybeEmbedPositionAdjustmentPatterns(FX_INT32 version, CBC_Commo nByteMatrix* matrix, FX_INT32 &e);
49 };
50 #endif
OLDNEW
« no previous file with comments | « xfa/src/fxbarcode/src/include/BC_QRCoderMaskUtil.h ('k') | xfa/src/fxbarcode/src/include/BC_QRCoderMode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698