OLD | NEW |
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 #include "barcode.h" | 7 #include "barcode.h" |
8 #include "include/BC_Writer.h" | 8 #include "common/BC_CommonBitMatrix.h" |
9 #include "include/BC_CommonBitMatrix.h" | 9 #include "BC_Writer.h" |
10 #include "include/BC_TwoDimWriter.h" | 10 #include "BC_TwoDimWriter.h" |
11 CBC_TwoDimWriter::CBC_TwoDimWriter() | 11 CBC_TwoDimWriter::CBC_TwoDimWriter() |
12 { | 12 { |
13 m_iCorrectLevel = 1; | 13 m_iCorrectLevel = 1; |
14 m_bFixedSize = TRUE; | 14 m_bFixedSize = TRUE; |
15 m_output = NULL; | 15 m_output = NULL; |
16 } | 16 } |
17 CBC_TwoDimWriter::~CBC_TwoDimWriter() | 17 CBC_TwoDimWriter::~CBC_TwoDimWriter() |
18 { | 18 { |
19 if (m_output != NULL) { | 19 if (m_output != NULL) { |
20 delete m_output; | 20 delete m_output; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 m_output->Init(outputWidth, outputHeight); | 128 m_output->Init(outputWidth, outputHeight); |
129 for (FX_INT32 inputY = 0, outputY = topPadding; (inputY < inputHeight) && (o
utputY < outputHeight - multiY); inputY++, outputY += multiY) { | 129 for (FX_INT32 inputY = 0, outputY = topPadding; (inputY < inputHeight) && (o
utputY < outputHeight - multiY); inputY++, outputY += multiY) { |
130 for (FX_INT32 inputX = 0, outputX = leftPadding; (inputX < inputWidth) &
& (outputX < outputWidth - multiX); inputX++, outputX += multiX) { | 130 for (FX_INT32 inputX = 0, outputX = leftPadding; (inputX < inputWidth) &
& (outputX < outputWidth - multiX); inputX++, outputX += multiX) { |
131 if (code[inputX + inputY * inputWidth] == 1) { | 131 if (code[inputX + inputY * inputWidth] == 1) { |
132 m_output->SetRegion(outputX, outputY, multiX, multiY, e); | 132 m_output->SetRegion(outputX, outputY, multiX, multiY, e); |
133 BC_EXCEPTION_CHECK_ReturnVoid(e); | 133 BC_EXCEPTION_CHECK_ReturnVoid(e); |
134 } | 134 } |
135 } | 135 } |
136 } | 136 } |
137 } | 137 } |
OLD | NEW |