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
cfx_barcode.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_CFX_BARCODE_H_
8#define FXBARCODE_CFX_BARCODE_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_CodeBase;
19class CFX_Font;
21class CFX_Matrix;
22
24 public:
26
29 bool Encode(WideStringView contents);
30
31 bool RenderDevice(CFX_RenderDevice* device, const CFX_Matrix& matrix);
32
33 bool SetModuleHeight(int32_t moduleHeight);
34 bool SetModuleWidth(int32_t moduleWidth);
35 void SetHeight(int32_t height);
36 void SetWidth(int32_t width);
37
38 bool SetPrintChecksum(bool checksum);
39 bool SetDataLength(int32_t length);
40 bool SetCalChecksum(bool state);
41
42 bool SetFont(CFX_Font* pFont);
43 bool SetFontSize(float size);
44 bool SetFontColor(FX_ARGB color);
45
46 void SetTextLocation(BC_TEXT_LOC location);
47 bool SetWideNarrowRatio(int8_t ratio);
48 bool SetStartChar(char start);
49 bool SetEndChar(char end);
50 bool SetErrorCorrectionLevel(int32_t level);
51
52 private:
53 CFX_Barcode();
54
55 std::unique_ptr<CBC_CodeBase> m_pBCEngine;
56};
57
58#endif // FXBARCODE_CFX_BARCODE_H_
BC_TEXT_LOC
Definition BC_Library.h:12
BC_TYPE
Definition BC_Library.h:20
@ kCode128C
Definition BC_Library.h:26
@ kDataMatrix
Definition BC_Library.h:32
@ kCode128B
Definition BC_Library.h:25
bool SetEndChar(char end)
bool SetModuleWidth(int32_t moduleWidth)
bool SetStartChar(char start)
bool SetPrintChecksum(bool checksum)
void SetTextLocation(BC_TEXT_LOC location)
void SetHeight(int32_t height)
static std::unique_ptr< CFX_Barcode > Create(BC_TYPE type)
bool SetErrorCorrectionLevel(int32_t level)
bool SetModuleHeight(int32_t moduleHeight)
bool SetCalChecksum(bool state)
bool SetDataLength(int32_t length)
bool SetFont(CFX_Font *pFont)
bool Encode(WideStringView contents)
BC_TYPE GetType()
bool SetFontSize(float size)
void SetWidth(int32_t width)
bool SetFontColor(FX_ARGB color)
bool RenderDevice(CFX_RenderDevice *device, const CFX_Matrix &matrix)
bool SetWideNarrowRatio(int8_t ratio)
uint32_t FX_ARGB
Definition fx_dib.h:36
#define NOTREACHED_NORETURN()
Definition notreached.h:22
fxcrt::WideStringView WideStringView