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