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_OnedEAN8Writer.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_ONED_BC_ONEDEAN8WRITER_H_
8#define FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_
9
10#include <stdint.h>
11
12#include "core/fxcrt/fx_string.h"
13#include "fxbarcode/BC_Library.h"
14#include "fxbarcode/oned/BC_OnedEANWriter.h"
15
16class CFX_Matrix;
18
19class CBC_OnedEAN8Writer final : public CBC_OneDimEANWriter {
20 public:
22 ~CBC_OnedEAN8Writer() override;
23
24 // CBC_OneDimEANWriter:
25 DataVector<uint8_t> Encode(const ByteString& contents) override;
26 bool CheckContentValidity(WideStringView contents) override;
27 WideString FilterContents(WideStringView contents) override;
28 void SetDataLength(int32_t length) override;
29 void SetTextLocation(BC_TEXT_LOC location) override;
30 int32_t CalcChecksum(const ByteString& contents) override;
31
32 private:
33 bool ShowChars(WideStringView contents,
34 CFX_RenderDevice* device,
35 const CFX_Matrix& matrix,
36 int32_t barWidth) override;
37
38 static constexpr int32_t kDefaultCodeWidth = 3 + (7 * 4) + 5 + (7 * 4) + 3;
39 int32_t m_codeWidth = kDefaultCodeWidth;
40};
41
42#endif // FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_
BC_TEXT_LOC
Definition BC_Library.h:12
BC_TYPE
Definition BC_Library.h:25
~CBC_EAN8() override
BC_TYPE GetType() override
Definition cbc_ean8.cpp:32
size_t GetMaxLength() const override
Definition cbc_ean8.cpp:36
int32_t CalcChecksum(const ByteString &contents) override
bool ShowChars(WideStringView contents, CFX_RenderDevice *device, const CFX_Matrix &matrix, int32_t barWidth) override
~CBC_OnedEAN8Writer() override
bool CheckContentValidity(WideStringView contents) override
void SetTextLocation(BC_TEXT_LOC location) override
void SetDataLength(int32_t length) override
WideString FilterContents(WideStringView contents) override
DataVector< uint8_t > Encode(const ByteString &contents) override