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_OnedCode39Writer.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_ONEDCODE39WRITER_H_
8#define FXBARCODE_ONED_BC_ONEDCODE39WRITER_H_
9
10#include <stddef.h>
11
12#include "fxbarcode/BC_Library.h"
13#include "fxbarcode/oned/BC_OneDimWriter.h"
14
15class CBC_OnedCode39Writer final : public CBC_OneDimWriter {
16 public:
19
20 // CBC_OneDimWriter
21 DataVector<uint8_t> Encode(const ByteString& contents) override;
22 bool RenderResult(WideStringView contents,
23 pdfium::span<const uint8_t> code) override;
24 bool CheckContentValidity(WideStringView contents) override;
25 WideString FilterContents(WideStringView contents) override;
26 void SetTextLocation(BC_TEXT_LOC location) override;
27 bool SetWideNarrowRatio(int8_t ratio) override;
28
29 WideString RenderTextContents(WideStringView contents);
30 bool encodedContents(WideStringView contents, WideString* result);
31
32 private:
33 static constexpr size_t kArraySize = 9;
34
35 void ToIntArray(int16_t value, uint8_t array[kArraySize]) const;
36
37 int8_t m_iWideNarrRatio = 3;
38};
39
40#endif // FXBARCODE_ONED_BC_ONEDCODE39WRITER_H_
BC_TEXT_LOC
Definition BC_Library.h:12
BC_TYPE
Definition BC_Library.h:25
bool Encode(WideStringView contents) override
bool RenderDevice(CFX_RenderDevice *device, const CFX_Matrix &matrix) override
~CBC_Code39() override
BC_TYPE GetType() override
bool RenderDeviceResult(CFX_RenderDevice *device, const CFX_Matrix &matrix, WideStringView contents)
void SetTextLocation(BC_TEXT_LOC location) override
bool RenderResult(WideStringView contents, pdfium::span< const uint8_t > code) override
bool CheckContentValidity(WideStringView contents) override
~CBC_OnedCode39Writer() override
WideString RenderTextContents(WideStringView contents)
bool encodedContents(WideStringView contents, WideString *result)
DataVector< uint8_t > Encode(const ByteString &contents) override
bool SetWideNarrowRatio(int8_t ratio) override
WideString FilterContents(WideStringView contents) override
ByteString ToUTF8() const