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

Side by Side Diff: xfa/fxbarcode/BC_TwoDimWriter.cpp

Issue 2027273002: Fix all the code which has duplicate variable declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 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 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "core/fxge/include/fx_ge.h" 9 #include "core/fxge/include/fx_ge.h"
10 #include "third_party/base/numerics/safe_math.h" 10 #include "third_party/base/numerics/safe_math.h"
(...skipping 28 matching lines...) Expand all
39 (FX_FLOAT)m_Width / (FX_FLOAT)m_output->GetWidth(), 0.0, 0.0, 39 (FX_FLOAT)m_Width / (FX_FLOAT)m_output->GetWidth(), 0.0, 0.0,
40 (FX_FLOAT)m_Height / (FX_FLOAT)m_output->GetHeight(), 0.0, 0.0); 40 (FX_FLOAT)m_Height / (FX_FLOAT)m_output->GetHeight(), 0.0, 0.0);
41 matriScale.Concat(*matrix); 41 matriScale.Concat(*matrix);
42 matri = matriScale; 42 matri = matriScale;
43 } 43 }
44 for (int32_t x = 0; x < m_output->GetWidth(); x++) { 44 for (int32_t x = 0; x < m_output->GetWidth(); x++) {
45 for (int32_t y = 0; y < m_output->GetHeight(); y++) { 45 for (int32_t y = 0; y < m_output->GetHeight(); y++) {
46 CFX_PathData rect; 46 CFX_PathData rect;
47 rect.AppendRect((FX_FLOAT)leftPos + x, (FX_FLOAT)topPos + y, 47 rect.AppendRect((FX_FLOAT)leftPos + x, (FX_FLOAT)topPos + y,
48 (FX_FLOAT)(leftPos + x + 1), (FX_FLOAT)(topPos + y + 1)); 48 (FX_FLOAT)(leftPos + x + 1), (FX_FLOAT)(topPos + y + 1));
49 CFX_GraphStateData stateData;
50 if (m_output->Get(x, y)) { 49 if (m_output->Get(x, y)) {
51 device->DrawPath(&rect, &matri, &stateData, m_barColor, 0, 50 CFX_GraphStateData data;
52 FXFILL_WINDING); 51 device->DrawPath(&rect, &matri, &data, m_barColor, 0, FXFILL_WINDING);
53 } 52 }
54 } 53 }
55 } 54 }
56 } 55 }
57 56
58 void CBC_TwoDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap, 57 void CBC_TwoDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap,
59 int32_t& e) { 58 int32_t& e) {
60 if (m_bFixedSize) { 59 if (m_bFixedSize) {
61 pOutBitmap = CreateDIBitmap(m_Width, m_Height); 60 pOutBitmap = CreateDIBitmap(m_Width, m_Height);
62 } else { 61 } else {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 for (int32_t inputX = 0, outputX = leftPadding; 139 for (int32_t inputX = 0, outputX = leftPadding;
141 (inputX < inputWidth) && (outputX < outputWidth - multiX); 140 (inputX < inputWidth) && (outputX < outputWidth - multiX);
142 inputX++, outputX += multiX) { 141 inputX++, outputX += multiX) {
143 if (code[inputX + inputY * inputWidth] == 1) { 142 if (code[inputX + inputY * inputWidth] == 1) {
144 m_output->SetRegion(outputX, outputY, multiX, multiY, e); 143 m_output->SetRegion(outputX, outputY, multiX, multiY, e);
145 BC_EXCEPTION_CHECK_ReturnVoid(e); 144 BC_EXCEPTION_CHECK_ReturnVoid(e);
146 } 145 }
147 } 146 }
148 } 147 }
149 } 148 }
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_listboximp.cpp ('k') | xfa/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698