OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_CBC_ONECODE_H_ | 7 #ifndef XFA_FXBARCODE_CBC_ONECODE_H_ |
8 #define XFA_FXBARCODE_CBC_ONECODE_H_ | 8 #define XFA_FXBARCODE_CBC_ONECODE_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_string.h" | 10 #include "core/fxcrt/include/fx_string.h" |
11 #include "core/fxcrt/include/fx_system.h" | 11 #include "core/fxcrt/include/fx_system.h" |
12 #include "xfa/fxbarcode/cbc_codebase.h" | 12 #include "xfa/fxbarcode/cbc_codebase.h" |
13 | 13 |
14 class CFX_DIBitmap; | 14 class CFX_DIBitmap; |
15 class CFX_Font; | 15 class CFX_Font; |
16 class CFX_RenderDevice; | 16 class CFX_RenderDevice; |
17 | 17 |
18 class CBC_OneCode : public CBC_CodeBase { | 18 class CBC_OneCode : public CBC_CodeBase { |
19 public: | 19 public: |
20 CBC_OneCode(); | 20 CBC_OneCode(); |
21 virtual ~CBC_OneCode(); | 21 ~CBC_OneCode() override; |
22 | |
23 virtual BC_TYPE GetType() = 0; | |
24 | |
25 virtual FX_BOOL Encode(const CFX_WideStringC& contents, | |
26 FX_BOOL isDevice, | |
27 int32_t& e) = 0; | |
28 virtual CFX_WideString Decode(uint8_t* buf, | |
29 int32_t width, | |
30 int32_t hight, | |
31 int32_t& e) = 0; | |
32 virtual CFX_WideString Decode(CFX_DIBitmap* pBitmap, int32_t& e) = 0; | |
33 | |
34 virtual FX_BOOL RenderDevice(CFX_RenderDevice* device, | |
35 const CFX_Matrix* matirx, | |
36 int32_t& e) = 0; | |
37 virtual FX_BOOL RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e) = 0; | |
38 | |
39 | 22 |
40 virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); | 23 virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); |
41 virtual CFX_WideString FilterContents(const CFX_WideStringC& contents); | 24 virtual CFX_WideString FilterContents(const CFX_WideStringC& contents); |
42 | 25 |
43 virtual void SetPrintChecksum(FX_BOOL checksum); | 26 virtual void SetPrintChecksum(FX_BOOL checksum); |
44 virtual void SetDataLength(int32_t length); | 27 virtual void SetDataLength(int32_t length); |
45 virtual void SetCalChecksum(FX_BOOL calc); | 28 virtual void SetCalChecksum(FX_BOOL calc); |
46 virtual FX_BOOL SetFont(CFX_Font* cFont); | 29 virtual FX_BOOL SetFont(CFX_Font* cFont); |
47 virtual void SetFontSize(FX_FLOAT size); | 30 virtual void SetFontSize(FX_FLOAT size); |
48 virtual void SetFontStyle(int32_t style); | 31 virtual void SetFontStyle(int32_t style); |
49 virtual void SetFontColor(FX_ARGB color); | 32 virtual void SetFontColor(FX_ARGB color); |
50 }; | 33 }; |
51 | 34 |
52 #endif // XFA_FXBARCODE_CBC_ONECODE_H_ | 35 #endif // XFA_FXBARCODE_CBC_ONECODE_H_ |
OLD | NEW |