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

Side by Side Diff: xfa/fxbarcode/oned/BC_OnedEAN13Writer.h

Issue 1816133002: Move xfa/include/fxbarcode/BC_Barcode.h to xfa/fxbarcode. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_ 7 #ifndef XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_
8 #define XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_ 8 #define XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_
9 9
10 class CBC_OneDimWriter; 10 #include "core/include/fxcrt/fx_string.h"
11 class CBC_OnedEAN13Writer; 11 #include "core/include/fxcrt/fx_system.h"
12 #include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
13
14 class CFX_DIBitmap;
15 class CFX_RenderDevice;
16
12 class CBC_OnedEAN13Writer : public CBC_OneDimWriter { 17 class CBC_OnedEAN13Writer : public CBC_OneDimWriter {
13 private:
14 int32_t m_codeWidth;
15
16 public: 18 public:
17 CBC_OnedEAN13Writer(); 19 CBC_OnedEAN13Writer();
18 virtual ~CBC_OnedEAN13Writer(); 20 virtual ~CBC_OnedEAN13Writer();
19 21
20 uint8_t* Encode(const CFX_ByteString& contents, 22 uint8_t* Encode(const CFX_ByteString& contents,
21 BCFORMAT format, 23 BCFORMAT format,
22 int32_t& outWidth, 24 int32_t& outWidth,
23 int32_t& outHeight, 25 int32_t& outHeight,
24 int32_t& e); 26 int32_t& e);
25 uint8_t* Encode(const CFX_ByteString& contents, 27 uint8_t* Encode(const CFX_ByteString& contents,
26 BCFORMAT format, 28 BCFORMAT format,
27 int32_t& outWidth, 29 int32_t& outWidth,
28 int32_t& outHeight, 30 int32_t& outHeight,
29 int32_t hints, 31 int32_t hints,
30 int32_t& e); 32 int32_t& e);
31 uint8_t* Encode(const CFX_ByteString& contents, 33 uint8_t* Encode(const CFX_ByteString& contents,
32 int32_t& outLength, 34 int32_t& outLength,
33 int32_t& e); 35 int32_t& e);
36
34 void RenderResult(const CFX_WideStringC& contents, 37 void RenderResult(const CFX_WideStringC& contents,
35 uint8_t* code, 38 uint8_t* code,
36 int32_t codeLength, 39 int32_t codeLength,
37 FX_BOOL isDevice, 40 FX_BOOL isDevice,
38 int32_t& e); 41 int32_t& e);
39 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); 42 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents);
40 CFX_WideString FilterContents(const CFX_WideStringC& contents); 43 CFX_WideString FilterContents(const CFX_WideStringC& contents);
41 int32_t CalcChecksum(const CFX_ByteString& contents); 44 int32_t CalcChecksum(const CFX_ByteString& contents);
42 45
43 protected: 46 protected:
44 void ShowChars(const CFX_WideStringC& contents, 47 void ShowChars(const CFX_WideStringC& contents,
45 CFX_DIBitmap* pOutBitmap, 48 CFX_DIBitmap* pOutBitmap,
46 CFX_RenderDevice* device, 49 CFX_RenderDevice* device,
47 const CFX_Matrix* matrix, 50 const CFX_Matrix* matrix,
48 int32_t barWidth, 51 int32_t barWidth,
49 int32_t multiple, 52 int32_t multiple,
50 int32_t& e); 53 int32_t& e);
54
55 private:
56 int32_t m_codeWidth;
51 }; 57 };
52 58
53 #endif // XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_ 59 #endif // XFA_FXBARCODE_ONED_BC_ONEDEAN13WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698