74 for (size_t i = contents.GetLength(); i > 0; i--) {
76 odd += FXSYS_DecimalCharToInt(contents[i - 1]);
78 even += FXSYS_DecimalCharToInt(contents[i - 1]);
82 int32_t checksum = (odd * 3 + even) % 10;
83 checksum = (10 - checksum) % 10;
100 constexpr float kLeftPosition = 17.0f;
102 size_t length = str.GetLength();
103 std::vector<TextCharPos> charpos(length);
105 constexpr float kWidth = 35.0f;
108 length = tempStr.GetLength();
109 int32_t iFontSize =
static_cast<int32_t>(fabs(
m_fFontSize));
110 int32_t iTextHeight = iFontSize + 1;
114 kLeftPosition + kWidth - 0.5
, (
float)
m_Height);
120 kLeftPosition + 40 + kWidth - 0.5
, (
float)
m_Height);
124 constexpr float kWidth1 = 7.0f;
133 kLeftPosition + 85 + kWidth1 - 0.5
, (
float)
m_Height);
139 pdfium::span<TextCharPos> charpos_span =
pdfium::make_span(charpos);
140 CalcTextInfo(tempStr, charpos_span.subspan(1), m_pFont, strWidth, iFontSize,
145 (
float)(
m_Height - iTextHeight + iFontSize)
);
147 device->DrawNormalText(charpos_span.subspan(1, length), m_pFont,
148 static_cast<
float>(iFontSize), affine_matrix1,
149 m_fontColor, GetTextRenderOptions());
151 tempStr = str.Substr(6, 5);
152 length = tempStr.GetLength();
153 CalcTextInfo(tempStr, charpos_span.subspan(6), m_pFont, strWidth, iFontSize,
158 (
float)(
m_Height - iTextHeight + iFontSize)
);
160 device->DrawNormalText(charpos_span.subspan(6, length), m_pFont,
161 static_cast<
float>(iFontSize), affine_matrix1,
162 m_fontColor, GetTextRenderOptions());
164 tempStr = str.First(1);
165 length = tempStr.GetLength();
168 CalcTextInfo(tempStr, charpos, m_pFont, strWidth, iFontSize, blank);
171 (
float)(
m_Height - iTextHeight + iFontSize)
);
173 device->DrawNormalText(charpos_span.first(length), m_pFont,
174 static_cast<
float>(iFontSize), affine_matrix1,
175 m_fontColor, GetTextRenderOptions());
177 tempStr = str.Substr(11, 1);
178 length = tempStr.GetLength();
179 CalcTextInfo(tempStr, charpos_span.subspan(11), m_pFont, strWidth, iFontSize,
184 (
float)(
m_Height - iTextHeight + iFontSize)
);
186 device->DrawNormalText(charpos_span.subspan(11, length), m_pFont,
187 static_cast<
float>(iFontSize), affine_matrix1,
188 m_fontColor, GetTextRenderOptions());