Home | History | Annotate | Download | only in pdf417
      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 FXBARCODE_PDF417_BC_PDF417WRITER_H_
      8 #define FXBARCODE_PDF417_BC_PDF417WRITER_H_
      9 
     10 #include <vector>
     11 
     12 #include "core/fxcrt/fx_string.h"
     13 #include "core/fxcrt/fx_system.h"
     14 #include "fxbarcode/BC_TwoDimWriter.h"
     15 
     16 class CBC_PDF417Writer : public CBC_TwoDimWriter {
     17  public:
     18   CBC_PDF417Writer();
     19   ~CBC_PDF417Writer() override;
     20 
     21   uint8_t* Encode(const WideString& contents,
     22                   int32_t& outWidth,
     23                   int32_t& outHeight);
     24 
     25   // CBC_TwoDimWriter
     26   bool SetErrorCorrectionLevel(int32_t level) override;
     27 
     28   void SetTruncated(bool truncated);
     29 
     30  private:
     31   void rotateArray(std::vector<uint8_t>& bitarray,
     32                    int32_t width,
     33                    int32_t height);
     34   bool m_bTruncated;
     35 };
     36 
     37 #endif  // FXBARCODE_PDF417_BC_PDF417WRITER_H_
     38