Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1195)

Unified Diff: xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp

Issue 2055103002: remove redundant CFX_Matrix* cast in one-d barcode (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/oned/BC_OneDimWriter.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index 20b52774e869d1183138a41de06d9d475074c878..fd3e1d13793549f184edf5fef3d41fabc69fe076 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -222,8 +222,7 @@ 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_Matrix*)&affine_matrix, m_fontColor,
- FXTEXT_CLEARTYPE);
+ &affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0,
@@ -232,10 +231,9 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
if (matrix) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(iLen, pCharPos + 1, m_pFont,
- CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
- m_fontColor, FXTEXT_CLEARTYPE);
+ device->DrawNormalText(
+ iLen, pCharPos + 1, m_pFont, CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(7, 6);
iLen = tempStr.GetLength();
@@ -246,8 +244,7 @@ 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_Matrix*)&affine_matrix, m_fontColor,
- FXTEXT_CLEARTYPE);
+ &affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 47 * multiple,
m_Height - iTextHeight);
} else {
@@ -258,10 +255,9 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
if (matrix) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(iLen, pCharPos + 7, m_pFont,
- CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
- m_fontColor, FXTEXT_CLEARTYPE);
+ device->DrawNormalText(
+ iLen, pCharPos + 7, m_pFont, CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(0, 1);
iLen = tempStr.GetLength();
@@ -277,8 +273,7 @@ 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_Matrix*)&affine_matrix, m_fontColor,
- FXTEXT_CLEARTYPE);
+ &affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), 0, m_Height - iTextHeight);
} else {
CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0, 0.0,
@@ -286,10 +281,9 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
if (matrix) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(iLen, pCharPos, m_pFont,
- CFX_GEModule::Get()->GetFontCache(),
- (FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix1,
- m_fontColor, FXTEXT_CLEARTYPE);
+ device->DrawNormalText(
+ iLen, pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
}
FX_Free(pCharPos);
}
« no previous file with comments | « xfa/fxbarcode/oned/BC_OneDimWriter.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698