Chromium Code Reviews| 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_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_ | 7 #ifndef XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_ |
| 8 #define XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_ | 8 #define XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_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/include/BC_Library.h" | 12 #include "xfa/fxbarcode/include/BC_Library.h" |
| 13 #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" | 13 #include "xfa/fxbarcode/oned/BC_OneDimWriter.h" |
| 14 | 14 |
| 15 class CFX_DIBitmap; | 15 class CFX_DIBitmap; |
| 16 class CFX_RenderDevice; | 16 class CFX_RenderDevice; |
| 17 | 17 |
| 18 class CBC_OnedEAN8Writer : public CBC_OneDimWriter { | 18 class CBC_OnedEAN8Writer : public CBC_OneDimWriter { |
| 19 private: | 19 private: |
|
Lei Zhang
2016/06/15 00:04:30
Another private section that's out of place.
Wei Li
2016/06/15 00:32:39
Done.
| |
| 20 int32_t m_codeWidth; | 20 int32_t m_codeWidth; |
| 21 | 21 |
| 22 public: | 22 public: |
| 23 CBC_OnedEAN8Writer(); | 23 CBC_OnedEAN8Writer(); |
| 24 virtual ~CBC_OnedEAN8Writer(); | 24 ~CBC_OnedEAN8Writer() override; |
| 25 | 25 |
| 26 // CBC_OneDimWriter | |
| 26 uint8_t* Encode(const CFX_ByteString& contents, | 27 uint8_t* Encode(const CFX_ByteString& contents, |
| 27 BCFORMAT format, | 28 BCFORMAT format, |
| 28 int32_t& outWidth, | 29 int32_t& outWidth, |
| 29 int32_t& outHeight, | 30 int32_t& outHeight, |
| 30 int32_t& e); | 31 int32_t& e) override; |
| 31 uint8_t* Encode(const CFX_ByteString& contents, | 32 uint8_t* Encode(const CFX_ByteString& contents, |
| 32 BCFORMAT format, | 33 BCFORMAT format, |
| 33 int32_t& outWidth, | 34 int32_t& outWidth, |
| 34 int32_t& outHeight, | 35 int32_t& outHeight, |
| 35 int32_t hints, | 36 int32_t hints, |
| 36 int32_t& e); | 37 int32_t& e) override; |
| 37 uint8_t* Encode(const CFX_ByteString& contents, | 38 uint8_t* Encode(const CFX_ByteString& contents, |
| 38 int32_t& outLength, | 39 int32_t& outLength, |
| 39 int32_t& e); | 40 int32_t& e) override; |
| 40 | 41 |
| 41 void RenderResult(const CFX_WideStringC& contents, | 42 void RenderResult(const CFX_WideStringC& contents, |
| 42 uint8_t* code, | 43 uint8_t* code, |
| 43 int32_t codeLength, | 44 int32_t codeLength, |
| 44 FX_BOOL isDevice, | 45 FX_BOOL isDevice, |
| 45 int32_t& e); | 46 int32_t& e) override; |
| 46 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents); | 47 FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override; |
| 47 CFX_WideString FilterContents(const CFX_WideStringC& contents); | 48 CFX_WideString FilterContents(const CFX_WideStringC& contents) override; |
| 48 void SetDataLength(int32_t length); | 49 void SetDataLength(int32_t length) override; |
| 50 | |
| 49 FX_BOOL SetTextLocation(BC_TEXT_LOC location); | 51 FX_BOOL SetTextLocation(BC_TEXT_LOC location); |
| 50 int32_t CalcChecksum(const CFX_ByteString& contents); | 52 int32_t CalcChecksum(const CFX_ByteString& contents); |
| 51 | 53 |
| 52 protected: | 54 protected: |
| 53 void ShowChars(const CFX_WideStringC& contents, | 55 void ShowChars(const CFX_WideStringC& contents, |
| 54 CFX_DIBitmap* pOutBitmap, | 56 CFX_DIBitmap* pOutBitmap, |
| 55 CFX_RenderDevice* device, | 57 CFX_RenderDevice* device, |
| 56 const CFX_Matrix* matrix, | 58 const CFX_Matrix* matrix, |
| 57 int32_t barWidth, | 59 int32_t barWidth, |
| 58 int32_t multiple, | 60 int32_t multiple, |
| 59 int32_t& e); | 61 int32_t& e) override; |
| 60 }; | 62 }; |
| 61 | 63 |
| 62 #endif // XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_ | 64 #endif // XFA_FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_ |
| OLD | NEW |