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

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

Issue 2010813003: Remove default arguments from CFX_FxgeDevice. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@fxgeclean2_textrenderer
Patch Set: rebase Created 4 years, 7 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/fwl/theme/cfwl_formtp.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/oned/BC_OneDimWriter.cpp
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
index ae1b23795786d2026a15f6119dccf5c402015789..7b1cc50d729a37f6e1503d665746b019b156abc3 100644
--- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -201,6 +201,7 @@ void CBC_OneDimWriter::ShowDeviceChars(CFX_RenderDevice* device,
(FX_FLOAT)iFontSize, (CFX_Matrix*)&affine_matrix,
m_fontColor, FXTEXT_CLEARTYPE);
}
+
void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
const CFX_ByteString str,
FX_FLOAT geWidth,
@@ -211,7 +212,7 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
int32_t iFontSize = (int32_t)fabs(m_fFontSize);
int32_t iTextHeight = iFontSize + 1;
CFX_FxgeDevice ge;
- ge.Create((int)geWidth, iTextHeight, m_colorSpace);
+ ge.Create((int)geWidth, iTextHeight, m_colorSpace, nullptr);
FX_RECT geRect(0, 0, (int)geWidth, iTextHeight);
ge.FillRect(&geRect, m_backgroundColor);
CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize);
@@ -219,9 +220,10 @@ void CBC_OneDimWriter::ShowBitmapChars(CFX_DIBitmap* pOutBitmap,
CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
(CFX_Matrix*)&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
CFX_FxgeDevice geBitmap;
- geBitmap.Attach(pOutBitmap);
+ geBitmap.Attach(pOutBitmap, false, nullptr, false);
geBitmap.SetDIBits(ge.GetBitmap(), (int)locX, (int)locY);
}
+
void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents,
CFX_DIBitmap* pOutBitmap,
CFX_RenderDevice* device,
@@ -229,11 +231,11 @@ void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents,
int32_t barWidth,
int32_t multiple,
int32_t& e) {
- if (device == NULL && pOutBitmap == NULL) {
+ if (!device && !pOutBitmap) {
e = BCExceptionIllegalArgument;
return;
}
- if (m_pFont == NULL) {
+ if (!m_pFont) {
e = BCExceptionNullPointer;
return;
}
« no previous file with comments | « xfa/fwl/theme/cfwl_formtp.cpp ('k') | xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698