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
cbc_codebase.h
Go to the documentation of this file.
1// Copyright 2016 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_CBC_CODEBASE_H_
8#define FXBARCODE_CBC_CODEBASE_H_
9
10#include <stdint.h>
11
12#include <memory>
13
14#include "core/fxcrt/widestring.h"
15#include "core/fxge/dib/fx_dib.h"
16#include "fxbarcode/BC_Library.h"
17
18class CBC_Writer;
19class CFX_Matrix;
21
23 public:
24 explicit CBC_CodeBase(std::unique_ptr<CBC_Writer> pWriter);
25 virtual ~CBC_CodeBase();
26
27 virtual BC_TYPE GetType() = 0;
28 virtual bool Encode(WideStringView contents) = 0;
29 virtual bool RenderDevice(CFX_RenderDevice* device,
30 const CFX_Matrix& matrix) = 0;
31
32 void SetTextLocation(BC_TEXT_LOC location);
33 bool SetWideNarrowRatio(int8_t ratio);
34 bool SetStartChar(char start);
35 bool SetEndChar(char end);
36 bool SetErrorCorrectionLevel(int32_t level);
37 void SetCharEncoding(BC_CHAR_ENCODING encoding);
38 bool SetModuleHeight(int32_t moduleHeight);
39 bool SetModuleWidth(int32_t moduleWidth);
40 void SetHeight(int32_t height);
41 void SetWidth(int32_t width);
42
43 protected:
45};
46
47#endif // FXBARCODE_CBC_CODEBASE_H_
BC_TEXT_LOC
Definition BC_Library.h:12
BC_TYPE
Definition BC_Library.h:25
BC_CHAR_ENCODING
Definition BC_Library.h:20
BC_TYPE GetType() override
~CBC_Codabar() override
bool RenderDevice(CFX_RenderDevice *device, const CFX_Matrix &matrix) override
bool Encode(WideStringView contents) override
virtual bool Encode(WideStringView contents)=0
void SetTextLocation(BC_TEXT_LOC location)
void SetWidth(int32_t width)
bool SetModuleWidth(int32_t moduleWidth)
virtual bool RenderDevice(CFX_RenderDevice *device, const CFX_Matrix &matrix)=0
void SetCharEncoding(BC_CHAR_ENCODING encoding)
CBC_CodeBase(std::unique_ptr< CBC_Writer > pWriter)
bool SetModuleHeight(int32_t moduleHeight)
bool SetStartChar(char start)
std::unique_ptr< CBC_Writer > m_pBCWriter
virtual ~CBC_CodeBase()
bool SetErrorCorrectionLevel(int32_t level)
bool SetWideNarrowRatio(int8_t ratio)
void SetHeight(int32_t height)
virtual BC_TYPE GetType()=0
bool SetEndChar(char end)
void SetCalChecksum(bool calc)
void SetFontStyle(int32_t style)
void SetPrintChecksum(bool checksum)
~CBC_OneCode() override
CBC_OneCode(std::unique_ptr< CBC_Writer > pWriter)
void SetFontColor(FX_ARGB color)
void SetDataLength(int32_t length)
void SetFontSize(float size)
bool SetFont(CFX_Font *cFont)
bool RenderDeviceResult(CFX_RenderDevice *device, const CFX_Matrix &matrix, WideStringView contents)
bool CheckContentValidity(WideStringView contents) override