• 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 FXBARCODE_PDF417_BC_PDF417BARCODEMATRIX_H_
8 #define FXBARCODE_PDF417_BC_PDF417BARCODEMATRIX_H_
9 
10 #include <memory>
11 #include <vector>
12 
13 class CBC_BarcodeRow;
14 
15 class CBC_BarcodeMatrix final {
16  public:
17   CBC_BarcodeMatrix(size_t width, size_t height);
18   ~CBC_BarcodeMatrix();
19 
getRow(size_t row)20   CBC_BarcodeRow* getRow(size_t row) const { return m_matrix[row].get(); }
getWidth()21   size_t getWidth() const { return m_width; }
getHeight()22   size_t getHeight() const { return m_height; }
23   std::vector<uint8_t> toBitArray();
24 
25  private:
26   std::vector<std::unique_ptr<CBC_BarcodeRow>> m_matrix;
27   size_t m_width;
28   size_t m_height;
29 };
30 
31 #endif  // FXBARCODE_PDF417_BC_PDF417BARCODEMATRIX_H_
32