| 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_CORE_CFX_BARCODE_H_ | 7 #ifndef XFA_FWL_CORE_CFX_BARCODE_H_ |
| 8 #define XFA_FWL_CORE_CFX_BARCODE_H_ | 8 #define XFA_FWL_CORE_CFX_BARCODE_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class CFX_Matrix; | 21 class CFX_Matrix; |
| 22 | 22 |
| 23 class CFX_Barcode { | 23 class CFX_Barcode { |
| 24 public: | 24 public: |
| 25 CFX_Barcode(); | 25 CFX_Barcode(); |
| 26 ~CFX_Barcode(); | 26 ~CFX_Barcode(); |
| 27 | 27 |
| 28 bool Create(BC_TYPE type); | 28 bool Create(BC_TYPE type); |
| 29 BC_TYPE GetType(); | 29 BC_TYPE GetType(); |
| 30 bool Encode(const CFX_WideStringC& contents, bool isDevice, int32_t& e); | 30 bool Encode(const CFX_WideStringC& contents, bool isDevice, int32_t& e); |
| 31 |
| 31 bool RenderDevice(CFX_RenderDevice* device, | 32 bool RenderDevice(CFX_RenderDevice* device, |
| 32 const CFX_Matrix* matrix, | 33 const CFX_Matrix* matrix, |
| 33 int32_t& e); | 34 int32_t& e); |
| 34 bool RenderBitmap(CFX_DIBitmap*& pOutBitmap, int32_t& e); | 35 |
| 35 bool SetCharEncoding(BC_CHAR_ENCODING encoding); | 36 bool SetCharEncoding(BC_CHAR_ENCODING encoding); |
| 37 |
| 36 bool SetModuleHeight(int32_t moduleHeight); | 38 bool SetModuleHeight(int32_t moduleHeight); |
| 37 bool SetModuleWidth(int32_t moduleWidth); | 39 bool SetModuleWidth(int32_t moduleWidth); |
| 40 |
| 38 bool SetHeight(int32_t height); | 41 bool SetHeight(int32_t height); |
| 39 bool SetWidth(int32_t width); | 42 bool SetWidth(int32_t width); |
| 40 bool CheckContentValidity(const CFX_WideStringC& contents); | 43 |
| 41 bool SetPrintChecksum(bool checksum); | 44 bool SetPrintChecksum(bool checksum); |
| 42 bool SetDataLength(int32_t length); | 45 bool SetDataLength(int32_t length); |
| 43 bool SetCalChecksum(bool state); | 46 bool SetCalChecksum(bool state); |
| 47 |
| 44 bool SetFont(CFX_Font* pFont); | 48 bool SetFont(CFX_Font* pFont); |
| 45 bool SetFontSize(FX_FLOAT size); | 49 bool SetFontSize(FX_FLOAT size); |
| 46 bool SetFontStyle(int32_t style); | |
| 47 bool SetFontColor(FX_ARGB color); | 50 bool SetFontColor(FX_ARGB color); |
| 51 |
| 48 bool SetTextLocation(BC_TEXT_LOC location); | 52 bool SetTextLocation(BC_TEXT_LOC location); |
| 53 |
| 49 bool SetWideNarrowRatio(int32_t ratio); | 54 bool SetWideNarrowRatio(int32_t ratio); |
| 50 bool SetStartChar(FX_CHAR start); | 55 bool SetStartChar(FX_CHAR start); |
| 51 bool SetEndChar(FX_CHAR end); | 56 bool SetEndChar(FX_CHAR end); |
| 52 bool SetVersion(int32_t version); | 57 bool SetVersion(int32_t version); |
| 53 bool SetErrorCorrectionLevel(int32_t level); | 58 bool SetErrorCorrectionLevel(int32_t level); |
| 54 bool SetTruncated(bool truncated); | 59 bool SetTruncated(bool truncated); |
| 55 | 60 |
| 56 protected: | 61 private: |
| 57 std::unique_ptr<CBC_CodeBase> m_pBCEngine; | 62 std::unique_ptr<CBC_CodeBase> m_pBCEngine; |
| 58 }; | 63 }; |
| 59 | 64 |
| 60 #endif // XFA_FWL_CORE_CFX_BARCODE_H_ | 65 #endif // XFA_FWL_CORE_CFX_BARCODE_H_ |
| OLD | NEW |