| 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 _BC_TWODIMWRITER_H_ | 7 #ifndef XFA_SRC_FXBARCODE_BC_TWODIMWRITER_H_ |
| 8 #define _BC_TWODIMWRITER_H_ | 8 #define XFA_SRC_FXBARCODE_BC_TWODIMWRITER_H_ |
| 9 #include "BC_Writer.h" | 9 |
| 10 class CBC_Writer; | 10 #include "xfa/src/fxbarcode/BC_Writer.h" |
| 11 |
| 11 class CBC_CommonBitMatrix; | 12 class CBC_CommonBitMatrix; |
| 12 class CBC_TwoDimWriter; | 13 |
| 13 class CBC_TwoDimWriter : public CBC_Writer { | 14 class CBC_TwoDimWriter : public CBC_Writer { |
| 14 public: | 15 public: |
| 15 CBC_TwoDimWriter(); | 16 CBC_TwoDimWriter(); |
| 16 virtual ~CBC_TwoDimWriter(); | 17 virtual ~CBC_TwoDimWriter(); |
| 17 virtual uint8_t* Encode(const CFX_WideString& contents, | 18 virtual uint8_t* Encode(const CFX_WideString& contents, |
| 18 int32_t ecLevel, | 19 int32_t ecLevel, |
| 19 int32_t& outWidth, | 20 int32_t& outWidth, |
| 20 int32_t& outHeight, | 21 int32_t& outHeight, |
| 21 int32_t& e) { | 22 int32_t& e) { |
| 22 return NULL; | 23 return nullptr; |
| 23 }; | 24 }; |
| 24 virtual uint8_t* Encode(const CFX_ByteString& contents, | 25 virtual uint8_t* Encode(const CFX_ByteString& contents, |
| 25 BCFORMAT format, | 26 BCFORMAT format, |
| 26 int32_t& outWidth, | 27 int32_t& outWidth, |
| 27 int32_t& outHeight, | 28 int32_t& outHeight, |
| 28 int32_t hints, | 29 int32_t hints, |
| 29 int32_t& e) { | 30 int32_t& e) { |
| 30 return NULL; | 31 return nullptr; |
| 31 }; | 32 }; |
| 32 virtual uint8_t* Encode(const CFX_ByteString& contents, | 33 virtual uint8_t* Encode(const CFX_ByteString& contents, |
| 33 BCFORMAT format, | 34 BCFORMAT format, |
| 34 int32_t& outWidth, | 35 int32_t& outWidth, |
| 35 int32_t& outHeight, | 36 int32_t& outHeight, |
| 36 int32_t& e) { | 37 int32_t& e) { |
| 37 return NULL; | 38 return nullptr; |
| 38 }; | 39 }; |
| 39 virtual void RenderResult(uint8_t* code, | 40 virtual void RenderResult(uint8_t* code, |
| 40 int32_t codeWidth, | 41 int32_t codeWidth, |
| 41 int32_t codeHeight, | 42 int32_t codeHeight, |
| 42 int32_t& e); | 43 int32_t& e); |
| 43 virtual void RenderBitmapResult(CFX_DIBitmap*& pOutBitmap, int32_t& e); | 44 virtual void RenderBitmapResult(CFX_DIBitmap*& pOutBitmap, int32_t& e); |
| 44 virtual void RenderDeviceResult(CFX_RenderDevice* device, | 45 virtual void RenderDeviceResult(CFX_RenderDevice* device, |
| 45 const CFX_Matrix* matrix); | 46 const CFX_Matrix* matrix); |
| 46 virtual FX_BOOL SetErrorCorrectionLevel(int32_t level) = 0; | 47 virtual FX_BOOL SetErrorCorrectionLevel(int32_t level) = 0; |
| 47 virtual int32_t GetErrorCorrectionLevel() { return m_iCorrectLevel; }; | 48 virtual int32_t GetErrorCorrectionLevel() { return m_iCorrectLevel; }; |
| 48 | 49 |
| 49 protected: | 50 protected: |
| 50 int32_t m_iCorrectLevel; | 51 int32_t m_iCorrectLevel; |
| 51 FX_BOOL m_bFixedSize; | 52 FX_BOOL m_bFixedSize; |
| 52 CBC_CommonBitMatrix* m_output; | 53 CBC_CommonBitMatrix* m_output; |
| 53 }; | 54 }; |
| 54 #endif | 55 |
| 56 #endif // XFA_SRC_FXBARCODE_BC_TWODIMWRITER_H_ |
| OLD | NEW |