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_COMMON_BC_COMMONBITMATRIX_H_ 8 #define FXBARCODE_COMMON_BC_COMMONBITMATRIX_H_ 9 10 #include <vector> 11 12 #include "core/fxcrt/fx_system.h" 13 14 class CBC_CommonBitMatrix { 15 public: 16 CBC_CommonBitMatrix(); 17 ~CBC_CommonBitMatrix(); 18 19 void Init(int32_t width, int32_t height); 20 21 bool Get(int32_t x, int32_t y) const; 22 void Set(int32_t x, int32_t y); GetWidth()23 int32_t GetWidth() const { return m_width; } GetHeight()24 int32_t GetHeight() const { return m_height; } 25 26 private: 27 int32_t m_width = 0; 28 int32_t m_height = 0; 29 int32_t m_rowSize = 0; 30 std::vector<int32_t> m_bits; 31 }; 32 33 #endif // FXBARCODE_COMMON_BC_COMMONBITMATRIX_H_ 34