Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
BC_CommonByteMatrix.h
Go to the documentation of this file.
1// Copyright 2014 The PDFium Authors
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_COMMONBYTEMATRIX_H_
8#define FXBARCODE_COMMON_BC_COMMONBYTEMATRIX_H_
9
10#include <stdint.h>
11
12#include "core/fxcrt/data_vector.h"
13#include "third_party/base/containers/span.h"
14
15class CBC_CommonByteMatrix final {
16 public:
17 CBC_CommonByteMatrix(size_t width, size_t height);
19
20 size_t GetWidth() const { return m_width; }
21 size_t GetHeight() const { return m_height; }
22 pdfium::span<const uint8_t> GetArray() const { return m_bytes; }
24
25 uint8_t Get(size_t x, size_t y) const;
26 void Set(size_t x, size_t y, uint8_t value);
27 void Fill(uint8_t value);
28
29 private:
30 const size_t m_width;
31 const size_t m_height;
32 DataVector<uint8_t> m_bytes;
33};
34
35#endif // FXBARCODE_COMMON_BC_COMMONBYTEMATRIX_H_
void Set(size_t x, size_t y, uint8_t value)
DataVector< uint8_t > TakeArray()
CBC_CommonByteMatrix(size_t width, size_t height)
pdfium::span< const uint8_t > GetArray() const
void Fill(uint8_t value)
uint8_t Get(size_t x, size_t y) const