summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/oned/BC_OneDimWriter.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-26 20:15:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-26 20:15:19 -0700
commitbefa4506dc9d2a679c526aff96c09bcb0e9daecb (patch)
tree3c1d3e11d9802b2db95e35f4ab81ff449492ee10 /xfa/fxbarcode/oned/BC_OneDimWriter.cpp
parent7aed76f53137a71491040c776ab2f8931e91061b (diff)
downloadpdfium-befa4506dc9d2a679c526aff96c09bcb0e9daecb.tar.xz
Remove default arguments from CFX_FxgeDevice.
Remove unused dithering code. Review-Url: https://codereview.chromium.org/2010813003
Diffstat (limited to 'xfa/fxbarcode/oned/BC_OneDimWriter.cpp')
-rw-r--r--xfa/fxbarcode/oned/BC_OneDimWriter.cpp10
1 files changed, 6 insertions, 4 deletions
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;
}