OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_FXBARCODE_CBC_ONECODE_H_ |
| 8 #define XFA_FXBARCODE_CBC_ONECODE_H_ |
| 9 |
| 10 #include "core/include/fxcrt/fx_string.h" |
| 11 #include "core/include/fxcrt/fx_system.h" |
| 12 #include "xfa/fxbarcode/cbc_codebase.h" |
| 13 |
| 14 class CFX_DIBitmap; |
| 15 class CFX_Font; |
| 16 class CFX_RenderDevice; |
| 17 |
| 18 class CBC_OneCode : public CBC_CodeBase { |
| 19 public: |
| 20 CBC_OneCode(); |
| 21 virtual ~CBC_OneCode(); |
| 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 |
| 40 virtual FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); |
| 41 virtual CFX_WideString FilterContents(const CFX_WideStringC& contents); |
| 42 |
| 43 virtual void SetPrintChecksum(FX_BOOL checksum); |
| 44 virtual void SetDataLength(int32_t length); |
| 45 virtual void SetCalChecksum(FX_BOOL calc); |
| 46 virtual FX_BOOL SetFont(CFX_Font* cFont); |
| 47 virtual void SetFontSize(FX_FLOAT size); |
| 48 virtual void SetFontStyle(int32_t style); |
| 49 virtual void SetFontColor(FX_ARGB color); |
| 50 }; |
| 51 |
| 52 #endif // XFA_FXBARCODE_CBC_ONECODE_H_ |
OLD | NEW |