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