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_TwoDimWriter.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_BC_TWODIMWRITER_H_
8#define FXBARCODE_BC_TWODIMWRITER_H_
9
10#include <memory>
11
12#include "core/fxcrt/fx_coordinates.h"
13#include "fxbarcode/BC_Writer.h"
14#include "third_party/base/containers/span.h"
15
18
20 public:
21 explicit CBC_TwoDimWriter(bool bFixedSize);
22 ~CBC_TwoDimWriter() override;
23
24 bool RenderResult(pdfium::span<const uint8_t> code,
25 int32_t codeWidth,
26 int32_t codeHeight);
27 void RenderDeviceResult(CFX_RenderDevice* device, const CFX_Matrix& matrix);
28
29 int32_t error_correction_level() const { return m_iCorrectionLevel; }
30
31 protected:
32 void set_error_correction_level(int32_t level) { m_iCorrectionLevel = level; }
33
34 private:
35 std::unique_ptr<CBC_CommonBitMatrix> m_output;
36 int32_t m_multiX;
37 int32_t m_multiY;
38 int32_t m_leftPadding;
39 int32_t m_topPadding;
40 int32_t m_inputWidth;
41 int32_t m_inputHeight;
42 int32_t m_outputWidth;
43 int32_t m_outputHeight;
44 int32_t m_iCorrectionLevel = 1;
45 const bool m_bFixedSize;
46};
47
48#endif // FXBARCODE_BC_TWODIMWRITER_H_
bool RenderResult(pdfium::span< const uint8_t > code, int32_t codeWidth, int32_t codeHeight)
int32_t error_correction_level() const
void RenderDeviceResult(CFX_RenderDevice *device, const CFX_Matrix &matrix)
void set_error_correction_level(int32_t level)
~CBC_TwoDimWriter() override
CBC_TwoDimWriter(bool bFixedSize)
int32_t m_Width
Definition BC_Writer.h:37
int32_t m_Height
Definition BC_Writer.h:36
int32_t m_ModuleHeight
Definition BC_Writer.h:34
static const FX_ARGB kBackgroundColor
Definition BC_Writer.h:32
int32_t m_ModuleWidth
Definition BC_Writer.h:35
static const FX_ARGB kBarColor
Definition BC_Writer.h:31
CFX_Matrix & operator=(const CFX_Matrix &other)=default
CFX_Matrix(float a1, float b1, float c1, float d1, float e1, float f1)
void Concat(const CFX_Matrix &right)
void AppendRect(float left, float bottom, float right, float top)
Definition cfx_path.cpp:309
bool DrawPath(const CFX_Path &path, const CFX_Matrix *pObject2Device, const CFX_GraphStateData *pGraphState, uint32_t fill_color, uint32_t stroke_color, const CFX_FillRenderOptions &fill_options)
static constexpr CFX_FillRenderOptions EvenOddOptions()
static constexpr CFX_FillRenderOptions WindingOptions()