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 #ifndef _BC_CODEBASE_H_ | 7 #ifndef XFA_INCLUDE_FXBARCODE_BC_BARCODE_H_ |
8 #define _BC_CODEBASE_H_ | 8 #define XFA_INCLUDE_FXBARCODE_BC_BARCODE_H_ |
9 void BC_Library_Init(); | 9 |
10 void BC_Library_Destory(); | 10 #include "core/include/fxcrt/fx_string.h" |
11 class CBC_CodeBase; | 11 #include "core/include/fxcrt/fx_system.h" |
| 12 #include "core/include/fxge/fx_dib.h" |
| 13 |
| 14 class CBC_Reader; |
12 class CBC_Writer; | 15 class CBC_Writer; |
13 class CBC_Reader; | 16 class CFX_Font; |
| 17 class CFX_RenderDevice; |
| 18 |
14 enum BC_TEXT_LOC { | 19 enum BC_TEXT_LOC { |
15 BC_TEXT_LOC_NONE = 0, | 20 BC_TEXT_LOC_NONE = 0, |
16 BC_TEXT_LOC_ABOVE, | 21 BC_TEXT_LOC_ABOVE, |
17 BC_TEXT_LOC_BELOW, | 22 BC_TEXT_LOC_BELOW, |
18 BC_TEXT_LOC_ABOVEEMBED, | 23 BC_TEXT_LOC_ABOVEEMBED, |
19 BC_TEXT_LOC_BELOWEMBED | 24 BC_TEXT_LOC_BELOWEMBED |
20 }; | 25 }; |
| 26 |
21 enum BC_CHAR_ENCODING { CHAR_ENCODING_UTF8 = 0, CHAR_ENCODING_UNICODE }; | 27 enum BC_CHAR_ENCODING { CHAR_ENCODING_UTF8 = 0, CHAR_ENCODING_UNICODE }; |
| 28 |
22 enum BC_TYPE { | 29 enum BC_TYPE { |
23 BC_UNKNOWN = -1, | 30 BC_UNKNOWN = -1, |
24 BC_CODE39 = 0, | 31 BC_CODE39 = 0, |
25 BC_CODABAR, | 32 BC_CODABAR, |
26 BC_CODE128, | 33 BC_CODE128, |
27 BC_CODE128_B, | 34 BC_CODE128_B, |
28 BC_CODE128_C, | 35 BC_CODE128_C, |
29 BC_EAN8, | 36 BC_EAN8, |
30 BC_UPCA, | 37 BC_UPCA, |
31 BC_EAN13, | 38 BC_EAN13, |
32 BC_QR_CODE, | 39 BC_QR_CODE, |
33 BC_PDF417, | 40 BC_PDF417, |
34 BC_DATAMATRIX | 41 BC_DATAMATRIX |
35 }; | 42 }; |
| 43 |
| 44 void BC_Library_Init(); |
| 45 void BC_Library_Destory(); |
| 46 |
36 class CBC_CodeBase { | 47 class CBC_CodeBase { |
37 public: | 48 public: |
38 CBC_CodeBase(); | 49 CBC_CodeBase(); |
39 virtual ~CBC_CodeBase(); | 50 virtual ~CBC_CodeBase(); |
40 virtual BC_TYPE GetType() = 0; | 51 virtual BC_TYPE GetType() = 0; |
41 virtual FX_BOOL Encode(const CFX_WideStringC& contents, | 52 virtual FX_BOOL Encode(const CFX_WideStringC& contents, |
42 FX_BOOL isDevice, | 53 FX_BOOL isDevice, |
43 int32_t& e) = 0; | 54 int32_t& e) = 0; |
44 virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, | 55 virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, |
45 const CFX_Matrix* matirx, | 56 const CFX_Matrix* matirx, |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 virtual ~CBC_DataMatrix(); | 246 virtual ~CBC_DataMatrix(); |
236 FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); | 247 FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); |
237 FX_BOOL RenderDevice(CFX_RenderDevice* device, | 248 FX_BOOL RenderDevice(CFX_RenderDevice* device, |
238 const CFX_Matrix* matirx, | 249 const CFX_Matrix* matirx, |
239 int32_t& e); | 250 int32_t& e); |
240 FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); | 251 FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); |
241 CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); | 252 CFX_WideString Decode(uint8_t* buf, int32_t width, int32_t hight, int32_t& e); |
242 CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e); | 253 CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e); |
243 BC_TYPE GetType() { return BC_DATAMATRIX; } | 254 BC_TYPE GetType() { return BC_DATAMATRIX; } |
244 }; | 255 }; |
245 #endif | 256 |
| 257 #endif // XFA_INCLUDE_FXBARCODE_BC_BARCODE_H_ |
OLD | NEW |