diff options
Diffstat (limited to 'xfa/src/fxbarcode')
-rw-r--r-- | xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp | 17 | ||||
-rw-r--r-- | xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp | 45 | ||||
-rw-r--r-- | xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp | 30 | ||||
-rw-r--r-- | xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp | 56 |
4 files changed, 73 insertions, 75 deletions
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp index 04279f80b7..e456d3e546 100644 --- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp +++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp @@ -199,10 +199,10 @@ void CBC_OneDimWriter::ShowDeviceChars(CFX_RenderDevice* device, if (matrix != NULL) {
affine_matrix.Concat(*matrix);
}
- device->DrawNormalText(
- str.GetLength(), pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(str.GetLength(), pCharPos, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
const CFX_ByteString str,
@@ -217,11 +217,10 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap, ge.Create((int)geWidth, iTextHeight, m_colorSpace);
FX_RECT geRect(0, 0, (int)geWidth, iTextHeight);
ge.FillRect(&geRect, m_backgroundColor);
- CFX_AffineMatrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
- ge.DrawNormalText(
- str.GetLength(), pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
- FXTEXT_CLEARTYPE);
+ CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
+ ge.DrawNormalText(str.GetLength(), pCharPos, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
+ (CFX_Matrix*)&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
CFX_FxgeDevice geBitmap;
geBitmap.Attach(pOutBitmap);
geBitmap.SetDIBits(ge.GetBitmap(), (int)locX, (int)locY);
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp index d4f90a570f..e66df05445 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp @@ -217,7 +217,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, }
CalcTextInfo(tempStr, pCharPos + 1, m_pFont, (FX_FLOAT)strWidth, iFontSize,
blank);
- CFX_AffineMatrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
+ CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
CFX_FxgeDevice ge;
if (pOutBitmap != NULL) {
ge.Create(strWidth, iTextHeight, FXDIB_Argb);
@@ -225,20 +225,20 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, ge.FillRect(&rect, m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 1, m_pFont,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
- (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
+ (CFX_Matrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight);
} else {
- CFX_AffineMatrix affine_matrix1(
- 1.0, 0.0, 0.0, -1.0, (FX_FLOAT)leftPosition * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight) + iFontSize);
+ CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0,
+ (FX_FLOAT)leftPosition * m_outputHScale,
+ (FX_FLOAT)(m_Height - iTextHeight) + iFontSize);
if (matrix != NULL) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos + 1, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos + 1, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(7, 6);
iLen = tempStr.GetLength();
@@ -250,22 +250,22 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, ge.FillRect(&rect1, m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 7, m_pFont,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
- (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
+ (CFX_Matrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 47 * multiple,
m_Height - iTextHeight);
} else {
- CFX_AffineMatrix affine_matrix1(
+ CFX_Matrix affine_matrix1(
1.0, 0.0, 0.0, -1.0,
(FX_FLOAT)(leftPosition + 47 * multiple) * m_outputHScale,
(FX_FLOAT)(m_Height - iTextHeight + iFontSize));
if (matrix != NULL) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos + 7, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos + 7, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(0, 1);
iLen = tempStr.GetLength();
@@ -281,20 +281,19 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, ge.GetBitmap()->Clear(m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos, m_pFont,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
- (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
+ (CFX_Matrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), 0, m_Height - iTextHeight);
} else {
- CFX_AffineMatrix affine_matrix1(
- 1.0, 0.0, 0.0, -1.0, 0.0,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0, 0.0,
+ (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
if (matrix != NULL) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
FX_Free(pCharPos);
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp index 74ef0fb1f4..78503fae61 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp @@ -213,7 +213,7 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents, }
CalcTextInfo(tempStr, pCharPos, m_pFont, (FX_FLOAT)strWidth, iFontSize,
blank);
- CFX_AffineMatrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
+ CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
CFX_FxgeDevice ge;
if (pOutBitmap != NULL) {
delete ge.GetBitmap();
@@ -221,18 +221,18 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents, ge.GetBitmap()->Clear(m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos, m_pFont,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
- (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
+ (CFX_Matrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight);
} else {
- CFX_AffineMatrix affine_matrix1(
- 1.0, 0.0, 0.0, -1.0, (FX_FLOAT)leftPosition * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0,
+ (FX_FLOAT)leftPosition * m_outputHScale,
+ (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
affine_matrix1.Concat(*matrix);
- device->DrawNormalText(
- iLen, pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(4, 4);
iLen = tempStr.GetLength();
@@ -245,22 +245,22 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents, ge.GetBitmap()->Clear(m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 4, m_pFont,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
- (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
+ (CFX_Matrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 33 * multiple,
m_Height - iTextHeight);
} else {
- CFX_AffineMatrix affine_matrix1(
+ CFX_Matrix affine_matrix1(
1.0, 0.0, 0.0, -1.0,
(FX_FLOAT)(leftPosition + 33 * multiple) * m_outputHScale,
(FX_FLOAT)(m_Height - iTextHeight + iFontSize));
if (matrix != NULL) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos + 4, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos + 4, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
FX_Free(pCharPos);
}
diff --git a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp index da15a06d1a..d1b98993e7 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedUPCAWriter.cpp @@ -182,27 +182,27 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents, strWidth = strWidth * m_outputHScale;
}
CalcTextInfo(tempStr, pCharPos + 1, m_pFont, strWidth, iFontSize, blank);
- CFX_AffineMatrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
+ CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
CFX_FxgeDevice ge;
if (pOutBitmap != NULL) {
ge.Create((int)strWidth, iTextHeight, FXDIB_Argb);
ge.GetBitmap()->Clear(m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 1, m_pFont,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
- (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
+ (CFX_Matrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight);
} else {
- CFX_AffineMatrix affine_matrix1(
- 1.0, 0.0, 0.0, -1.0, (FX_FLOAT)leftPosition * m_outputHScale,
- (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0,
+ (FX_FLOAT)leftPosition * m_outputHScale,
+ (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
if (matrix != NULL) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos + 1, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos + 1, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(6, 5);
iLen = tempStr.GetLength();
@@ -213,22 +213,22 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents, ge.FillRect(&rect2, m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 6, m_pFont,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
- (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
+ (CFX_Matrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 40 * multiple,
m_Height - iTextHeight);
} else {
- CFX_AffineMatrix affine_matrix1(
+ CFX_Matrix affine_matrix1(
1.0, 0.0, 0.0, -1.0,
(FX_FLOAT)(leftPosition + 40 * multiple) * m_outputHScale,
(FX_FLOAT)(m_Height - iTextHeight + iFontSize));
if (matrix != NULL) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos + 6, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos + 6, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(0, 1);
iLen = tempStr.GetLength();
@@ -243,19 +243,19 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents, ge.GetBitmap()->Clear(m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos, m_pFont,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
- (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
+ (CFX_Matrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), 0, m_Height - iTextHeight);
} else {
- CFX_AffineMatrix affine_matrix1(
- 1.0, 0.0, 0.0, -1.0, 0, (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
+ CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0, 0,
+ (FX_FLOAT)(m_Height - iTextHeight + iFontSize));
if (matrix != NULL) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(11, 1);
iLen = tempStr.GetLength();
@@ -266,22 +266,22 @@ void CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents, ge.GetBitmap()->Clear(m_backgroundColor);
ge.DrawNormalText(iLen, pCharPos + 11, m_pFont,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
- (CFX_AffineMatrix*)&affine_matrix, m_fontColor,
+ (CFX_Matrix*)&affine_matrix, m_fontColor,
FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 85 * multiple,
m_Height - iTextHeight);
} else {
- CFX_AffineMatrix affine_matrix1(
+ CFX_Matrix affine_matrix1(
1.0, 0.0, 0.0, -1.0,
(FX_FLOAT)(leftPosition + 85 * multiple) * m_outputHScale,
(FX_FLOAT)(m_Height - iTextHeight + iFontSize));
if (matrix != NULL) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(
- iLen, pCharPos + 11, m_pFont, CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_AffineMatrix*)&affine_matrix1, m_fontColor,
- FXTEXT_CLEARTYPE);
+ device->DrawNormalText(iLen, pCharPos + 11, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
+ m_fontColor, FXTEXT_CLEARTYPE);
}
FX_Free(pCharPos);
}
|