From befa4506dc9d2a679c526aff96c09bcb0e9daecb Mon Sep 17 00:00:00 2001 From: thestig Date: Thu, 26 May 2016 20:15:19 -0700 Subject: Remove default arguments from CFX_FxgeDevice. Remove unused dithering code. Review-Url: https://codereview.chromium.org/2010813003 --- xfa/fxbarcode/oned/BC_OneDimWriter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'xfa/fxbarcode/oned/BC_OneDimWriter.cpp') diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp index ae1b237957..7b1cc50d72 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; } -- cgit v1.2.3