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_OneDimWriter Class Referenceabstract

#include <BC_OneDimWriter.h>

+ Inheritance diagram for CBC_OneDimWriter:
+ Collaboration diagram for CBC_OneDimWriter:

Public Member Functions

 CBC_OneDimWriter ()
 
 ~CBC_OneDimWriter () override
 
virtual bool RenderResult (WideStringView contents, pdfium::span< const uint8_t > code)
 
virtual bool CheckContentValidity (WideStringView contents)=0
 
virtual WideString FilterContents (WideStringView contents)=0
 
virtual void SetDataLength (int32_t length)
 
void SetPrintChecksum (bool checksum)
 
void SetCalcChecksum (bool state)
 
void SetFontSize (float size)
 
void SetFontStyle (int32_t style)
 
void SetFontColor (FX_ARGB color)
 
virtual DataVector< uint8_t > Encode (const ByteString &contents)=0
 
bool RenderDeviceResult (CFX_RenderDevice *device, const CFX_Matrix &matrix, WideStringView contents)
 
bool SetFont (CFX_Font *cFont)
 
- Public Member Functions inherited from CBC_Writer
 CBC_Writer ()
 
virtual ~CBC_Writer ()
 
void SetCharEncoding (BC_CHAR_ENCODING encoding)
 
bool SetModuleHeight (int32_t moduleHeight)
 
bool SetModuleWidth (int32_t moduleWidth)
 
void SetHeight (int32_t height)
 
void SetWidth (int32_t width)
 
virtual void SetTextLocation (BC_TEXT_LOC location)
 
virtual bool SetWideNarrowRatio (int8_t ratio)
 
virtual bool SetStartChar (char start)
 
virtual bool SetEndChar (char end)
 
virtual bool SetErrorCorrectionLevel (int32_t level)
 

Static Public Member Functions

static constexpr CFX_TextRenderOptions GetTextRenderOptions ()
 
static bool HasValidContentSize (WideStringView contents)
 

Protected Member Functions

virtual bool ShowChars (WideStringView contents, CFX_RenderDevice *device, const CFX_Matrix &matrix, int32_t barWidth)
 
void ShowDeviceChars (CFX_RenderDevice *device, const CFX_Matrix &matrix, const ByteString str, float geWidth, TextCharPos *pCharPos, float locX, float locY, int32_t barWidth)
 
void CalcTextInfo (const ByteString &text, TextCharPos *charPos, CFX_Font *cFont, float geWidth, int32_t fontSize, float &charsLen)
 
pdfium::span< uint8_t > AppendPattern (pdfium::span< uint8_t > target, pdfium::span< const uint8_t > pattern, bool startColor)
 

Protected Attributes

bool m_bPrintChecksum = true
 
bool m_bCalcChecksum = false
 
bool m_bLeftPadding = false
 
bool m_bRightPadding = false
 
UnownedPtr< CFX_Fontm_pFont
 
float m_fFontSize = 10.0f
 
int32_t m_iFontStyle = 0
 
uint32_t m_fontColor = 0xff000000
 
BC_TEXT_LOC m_locTextLoc = BC_TEXT_LOC::kBelowEmbed
 
int32_t m_iDataLenth = 0
 
size_t m_iContentLen = 0
 
std::vector< CFX_Pathm_output
 
int32_t m_barWidth
 
float m_outputHScale
 
- Protected Attributes inherited from CBC_Writer
int32_t m_ModuleHeight = 1
 
int32_t m_ModuleWidth = 1
 
int32_t m_Height = 320
 
int32_t m_Width = 640
 
FXDIB_Format m_colorSpace = FXDIB_Format::kArgb
 
BC_CHAR_ENCODING m_CharEncoding = BC_CHAR_ENCODING::kUTF8
 

Additional Inherited Members

- Static Protected Attributes inherited from CBC_Writer
static const FX_ARGB kBarColor = 0xff000000
 
static const FX_ARGB kBackgroundColor = 0xffffffff
 

Detailed Description

Definition at line 29 of file BC_OneDimWriter.h.

Constructor & Destructor Documentation

◆ CBC_OneDimWriter()

CBC_OneDimWriter::CBC_OneDimWriter ( )
default

◆ ~CBC_OneDimWriter()

CBC_OneDimWriter::~CBC_OneDimWriter ( )
overridedefault

Member Function Documentation

◆ AppendPattern()

pdfium::span< uint8_t > CBC_OneDimWriter::AppendPattern ( pdfium::span< uint8_t > target,
pdfium::span< const uint8_t > pattern,
bool startColor )
protected

Definition at line 88 of file BC_OneDimWriter.cpp.

Referenced by CBC_OnedCode39Writer::Encode(), CBC_OnedEAN13Writer::Encode(), and CBC_OnedEAN8Writer::Encode().

+ Here is the caller graph for this function:

◆ CalcTextInfo()

void CBC_OneDimWriter::CalcTextInfo ( const ByteString & text,
TextCharPos * charPos,
CFX_Font * cFont,
float geWidth,
int32_t fontSize,
float & charsLen )
protected

Definition at line 104 of file BC_OneDimWriter.cpp.

References CFX_Font::GetDescent(), CFX_Font::GetGlyphWidth(), TextCharPos::m_FontCharWidth, and TextCharPos::m_GlyphIndex.

+ Here is the call graph for this function:

◆ CheckContentValidity()

virtual bool CBC_OneDimWriter::CheckContentValidity ( WideStringView contents)
pure virtual

Implemented in CBC_OnedCodaBarWriter, CBC_OnedCode128Writer, CBC_OnedCode39Writer, CBC_OnedEAN13Writer, CBC_OnedEAN8Writer, and CBC_OnedUPCAWriter.

Referenced by CBC_EANCode::Encode().

+ Here is the caller graph for this function:

◆ Encode()

virtual DataVector< uint8_t > CBC_OneDimWriter::Encode ( const ByteString & contents)
pure virtual

◆ FilterContents()

virtual WideString CBC_OneDimWriter::FilterContents ( WideStringView contents)
pure virtual

Implemented in CBC_OnedCodaBarWriter, CBC_OnedCode128Writer, CBC_OnedCode39Writer, CBC_OnedEAN13Writer, CBC_OnedEAN8Writer, and CBC_OnedUPCAWriter.

Referenced by CBC_EANCode::Preprocess().

+ Here is the caller graph for this function:

◆ GetTextRenderOptions()

static constexpr CFX_TextRenderOptions CBC_OneDimWriter::GetTextRenderOptions ( )
inlinestaticconstexpr

Definition at line 31 of file BC_OneDimWriter.h.

References CFX_TextRenderOptions::CFX_TextRenderOptions(), and CFX_TextRenderOptions::kLcd.

+ Here is the call graph for this function:

◆ HasValidContentSize()

bool CBC_OneDimWriter::HasValidContentSize ( WideStringView contents)
static

Definition at line 43 of file BC_OneDimWriter.cpp.

Referenced by CBC_OnedCodaBarWriter::CheckContentValidity(), CBC_OnedCode128Writer::CheckContentValidity(), CBC_OnedCode39Writer::CheckContentValidity(), CBC_OnedEAN13Writer::CheckContentValidity(), CBC_OnedEAN8Writer::CheckContentValidity(), and CBC_OnedUPCAWriter::CheckContentValidity().

+ Here is the caller graph for this function:

◆ RenderDeviceResult()

bool CBC_OneDimWriter::RenderDeviceResult ( CFX_RenderDevice * device,
const CFX_Matrix & matrix,
WideStringView contents )

Definition at line 229 of file BC_OneDimWriter.cpp.

References CFX_Matrix::CFX_Matrix(), CFX_Path::AppendRect(), CFX_Matrix::Concat(), CFX_RenderDevice::DrawPath(), CFX_FillRenderOptions::EvenOddOptions(), CBC_Writer::kBackgroundColor, kNone, m_barWidth, CBC_Writer::m_Height, m_locTextLoc, m_outputHScale, CBC_Writer::m_Width, and ShowChars().

Referenced by CBC_Codabar::RenderDevice(), and CBC_Code39::RenderDevice().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderResult()

bool CBC_OneDimWriter::RenderResult ( WideStringView contents,
pdfium::span< const uint8_t > code )
virtual

Reimplemented in CBC_OnedCodaBarWriter, and CBC_OnedCode39Writer.

Definition at line 254 of file BC_OneDimWriter.cpp.

References m_barWidth, m_bLeftPadding, m_bRightPadding, CBC_Writer::m_ModuleHeight, m_outputHScale, and CBC_Writer::m_Width.

Referenced by CBC_OnedCodaBarWriter::RenderResult(), and CBC_OnedCode39Writer::RenderResult().

+ Here is the caller graph for this function:

◆ SetCalcChecksum()

void CBC_OneDimWriter::SetCalcChecksum ( bool state)

Definition at line 64 of file BC_OneDimWriter.cpp.

References m_bCalcChecksum.

Referenced by CBC_OneCode::SetCalChecksum().

+ Here is the caller graph for this function:

◆ SetDataLength()

void CBC_OneDimWriter::SetDataLength ( int32_t length)
virtual

Reimplemented in CBC_OnedCodaBarWriter, and CBC_OnedEAN8Writer.

Definition at line 60 of file BC_OneDimWriter.cpp.

References m_iDataLenth.

Referenced by CBC_OneCode::SetDataLength().

+ Here is the caller graph for this function:

◆ SetFont()

bool CBC_OneDimWriter::SetFont ( CFX_Font * cFont)

Definition at line 68 of file BC_OneDimWriter.cpp.

Referenced by CBC_OneCode::SetFont().

+ Here is the caller graph for this function:

◆ SetFontColor()

void CBC_OneDimWriter::SetFontColor ( FX_ARGB color)

Definition at line 84 of file BC_OneDimWriter.cpp.

References m_fontColor.

Referenced by CBC_OneCode::SetFontColor().

+ Here is the caller graph for this function:

◆ SetFontSize()

void CBC_OneDimWriter::SetFontSize ( float size)

Definition at line 76 of file BC_OneDimWriter.cpp.

References m_fFontSize.

Referenced by CBC_OneCode::SetFontSize().

+ Here is the caller graph for this function:

◆ SetFontStyle()

void CBC_OneDimWriter::SetFontStyle ( int32_t style)

Definition at line 80 of file BC_OneDimWriter.cpp.

References m_iFontStyle.

Referenced by CBC_OneCode::SetFontStyle().

+ Here is the caller graph for this function:

◆ SetPrintChecksum()

void CBC_OneDimWriter::SetPrintChecksum ( bool checksum)

Definition at line 56 of file BC_OneDimWriter.cpp.

References m_bPrintChecksum.

Referenced by CBC_OneCode::SetPrintChecksum().

+ Here is the caller graph for this function:

◆ ShowChars()

bool CBC_OneDimWriter::ShowChars ( WideStringView contents,
CFX_RenderDevice * device,
const CFX_Matrix & matrix,
int32_t barWidth )
protectedvirtual

Reimplemented in CBC_OnedEAN13Writer, CBC_OnedEAN8Writer, and CBC_OnedUPCAWriter.

Definition at line 175 of file BC_OneDimWriter.cpp.

References kAbove, kAboveEmbed, kBelow, kBelowEmbed, m_fFontSize, CBC_Writer::m_Height, m_locTextLoc, and ShowDeviceChars().

Referenced by RenderDeviceResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShowDeviceChars()

void CBC_OneDimWriter::ShowDeviceChars ( CFX_RenderDevice * device,
const CFX_Matrix & matrix,
const ByteString str,
float geWidth,
TextCharPos * pCharPos,
float locX,
float locY,
int32_t barWidth )
protected

Definition at line 150 of file BC_OneDimWriter.cpp.

References CFX_FloatRect::CFX_FloatRect(), CFX_Matrix::CFX_Matrix(), CFX_Matrix::Concat(), CFX_RenderDevice::FillRect(), CFX_FloatRect::GetOuterRect(), CBC_Writer::kBackgroundColor, m_fFontSize, CBC_Writer::m_Width, CFX_FloatRect::right, and CFX_Matrix::TransformRect().

Referenced by ShowChars().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_barWidth

int32_t CBC_OneDimWriter::m_barWidth
protected

Definition at line 95 of file BC_OneDimWriter.h.

Referenced by RenderDeviceResult(), and RenderResult().

◆ m_bCalcChecksum

bool CBC_OneDimWriter::m_bCalcChecksum = false
protected

◆ m_bLeftPadding

bool CBC_OneDimWriter::m_bLeftPadding = false
protected

◆ m_bPrintChecksum

bool CBC_OneDimWriter::m_bPrintChecksum = true
protected

Definition at line 80 of file BC_OneDimWriter.h.

Referenced by CBC_OnedCode39Writer::encodedContents(), and SetPrintChecksum().

◆ m_bRightPadding

bool CBC_OneDimWriter::m_bRightPadding = false
protected

Definition at line 83 of file BC_OneDimWriter.h.

Referenced by CBC_OnedUPCAWriter::CBC_OnedUPCAWriter(), and RenderResult().

◆ m_fFontSize

float CBC_OneDimWriter::m_fFontSize = 10.0f
protected

◆ m_fontColor

uint32_t CBC_OneDimWriter::m_fontColor = 0xff000000
protected

Definition at line 88 of file BC_OneDimWriter.h.

Referenced by SetFontColor().

◆ m_iContentLen

size_t CBC_OneDimWriter::m_iContentLen = 0
protected

Definition at line 92 of file BC_OneDimWriter.h.

◆ m_iDataLenth

◆ m_iFontStyle

int32_t CBC_OneDimWriter::m_iFontStyle = 0
protected

Definition at line 87 of file BC_OneDimWriter.h.

Referenced by SetFontStyle().

◆ m_locTextLoc

◆ m_output

std::vector<CFX_Path> CBC_OneDimWriter::m_output
protected

Definition at line 94 of file BC_OneDimWriter.h.

◆ m_outputHScale

float CBC_OneDimWriter::m_outputHScale
protected

◆ m_pFont

UnownedPtr<CFX_Font> CBC_OneDimWriter::m_pFont
protected

Definition at line 85 of file BC_OneDimWriter.h.


The documentation for this class was generated from the following files: