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 final : public CBC_TwoDimWriter { 17 public: 18 CBC_PDF417Writer(); 19 ~CBC_PDF417Writer() override; 20 21 std::vector<uint8_t> Encode(WideStringView contents, 22 int32_t* pOutWidth, 23 int32_t* pOutHeight); 24 25 // CBC_TwoDimWriter 26 bool SetErrorCorrectionLevel(int32_t level) override; 27 28 private: 29 void RotateArray(std::vector<uint8_t>* bitarray, 30 int32_t width, 31 int32_t height); 32 }; 33 34 #endif // FXBARCODE_PDF417_BC_PDF417WRITER_H_ 35