OLD | NEW |
| (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 XFA_FWL_BASEWIDGET_FXMATH_BARCODEIMP_H_ | |
8 #define XFA_FWL_BASEWIDGET_FXMATH_BARCODEIMP_H_ | |
9 | |
10 #include "core/fxcrt/include/fx_coordinates.h" | |
11 #include "core/fxcrt/include/fx_string.h" | |
12 #include "core/fxcrt/include/fx_system.h" | |
13 #include "core/fxge/include/fx_dib.h" | |
14 #include "xfa/fxbarcode/include/BC_Library.h" | |
15 | |
16 class CBC_CodeBase; | |
17 class CFX_Font; | |
18 class CFX_RenderDevice; | |
19 class CFX_Matrix; | |
20 | |
21 class CFX_Barcode { | |
22 public: | |
23 CFX_Barcode(); | |
24 ~CFX_Barcode(); | |
25 | |
26 FX_BOOL Create(BC_TYPE type); | |
27 BC_TYPE GetType(); | |
28 FX_BOOL Encode(const CFX_WideStringC& contents, FX_BOOL isDevice, int32_t& e); | |
29 FX_BOOL RenderDevice(CFX_RenderDevice* device, | |
30 const CFX_Matrix* matrix, | |
31 int32_t& e); | |
32 FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); | |
33 CFX_WideString Decode(uint8_t* buf, | |
34 int32_t width, | |
35 int32_t height, | |
36 int32_t& errorCode); | |
37 CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& errorCode); | |
38 FX_BOOL SetCharEncoding(BC_CHAR_ENCODING encoding); | |
39 FX_BOOL SetModuleHeight(int32_t moduleHeight); | |
40 FX_BOOL SetModuleWidth(int32_t moduleWidth); | |
41 FX_BOOL SetHeight(int32_t height); | |
42 FX_BOOL SetWidth(int32_t width); | |
43 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); | |
44 FX_BOOL SetPrintChecksum(FX_BOOL checksum); | |
45 FX_BOOL SetDataLength(int32_t length); | |
46 FX_BOOL SetCalChecksum(int32_t state); | |
47 FX_BOOL SetFont(CFX_Font* pFont); | |
48 FX_BOOL SetFontSize(FX_FLOAT size); | |
49 FX_BOOL SetFontStyle(int32_t style); | |
50 FX_BOOL SetFontColor(FX_ARGB color); | |
51 FX_BOOL SetTextLocation(BC_TEXT_LOC location); | |
52 FX_BOOL SetWideNarrowRatio(int32_t ratio); | |
53 FX_BOOL SetStartChar(FX_CHAR start); | |
54 FX_BOOL SetEndChar(FX_CHAR end); | |
55 FX_BOOL SetVersion(int32_t version); | |
56 FX_BOOL SetErrorCorrectionLevel(int32_t level); | |
57 FX_BOOL SetTruncated(FX_BOOL truncated); | |
58 | |
59 protected: | |
60 CBC_CodeBase* m_pBCEngine; | |
61 }; | |
62 | |
63 #endif // XFA_FWL_BASEWIDGET_FXMATH_BARCODEIMP_H_ | |
OLD | NEW |