• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 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_PDF417_BC_PDF417WRITER_H_
8 #define XFA_FXBARCODE_PDF417_BC_PDF417WRITER_H_
9 
10 #include "core/fxcrt/fx_string.h"
11 #include "core/fxcrt/fx_system.h"
12 #include "xfa/fxbarcode/BC_TwoDimWriter.h"
13 
14 class CBC_PDF417Writer : public CBC_TwoDimWriter {
15  public:
16   CBC_PDF417Writer();
17   ~CBC_PDF417Writer() override;
18 
19   uint8_t* Encode(const CFX_WideString& contents,
20                   int32_t& outWidth,
21                   int32_t& outHeight,
22                   int32_t& e);
23 
24   // CBC_TwoDimWriter
25   bool SetErrorCorrectionLevel(int32_t level) override;
26 
27   void SetTruncated(bool truncated);
28 
29  private:
30   void rotateArray(CFX_ArrayTemplate<uint8_t>& bitarray,
31                    int32_t width,
32                    int32_t height);
33   bool m_bTruncated;
34 };
35 
36 #endif  // XFA_FXBARCODE_PDF417_BC_PDF417WRITER_H_
37