diff options
Diffstat (limited to 'xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp')
-rw-r--r-- | xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp index 9b8456d6ed..de71b2074a 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedEAN13Writer.cpp @@ -171,7 +171,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, FXTEXT_CHARPOS* pCharPos = FX_Alloc(FXTEXT_CHARPOS, iLen); FXSYS_memset(pCharPos, 0, sizeof(FXTEXT_CHARPOS) * iLen); CFX_FxgeDevice geBitmap; - if (pOutBitmap != NULL) { + if (pOutBitmap) { geBitmap.Attach(pOutBitmap); } int32_t iFontSize = (int32_t)fabs(m_fFontSize); @@ -216,7 +216,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, blank); CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize); CFX_FxgeDevice ge; - if (pOutBitmap != NULL) { + if (pOutBitmap) { ge.Create(strWidth, iTextHeight, FXDIB_Argb); FX_RECT rect(0, 0, strWidth, iTextHeight); ge.FillRect(&rect, m_backgroundColor); @@ -229,7 +229,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, 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) { + if (matrix) { affine_matrix1.Concat(*matrix); } device->DrawNormalText(iLen, pCharPos + 1, m_pFont, @@ -242,7 +242,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, charsWidth = 0.0f; CalcTextInfo(tempStr, pCharPos + 7, m_pFont, (FX_FLOAT)strWidth, iFontSize, blank); - if (pOutBitmap != NULL) { + if (pOutBitmap) { FX_RECT rect1(0, 0, strWidth, iTextHeight); ge.FillRect(&rect1, m_backgroundColor); ge.DrawNormalText(iLen, pCharPos + 7, m_pFont, @@ -256,7 +256,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, 1.0, 0.0, 0.0, -1.0, (FX_FLOAT)(leftPosition + 47 * multiple) * m_outputHScale, (FX_FLOAT)(m_Height - iTextHeight + iFontSize)); - if (matrix != NULL) { + if (matrix) { affine_matrix1.Concat(*matrix); } device->DrawNormalText(iLen, pCharPos + 7, m_pFont, @@ -272,7 +272,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, } CalcTextInfo(tempStr, pCharPos, m_pFont, (FX_FLOAT)strWidth, iFontSize, blank); - if (pOutBitmap != NULL) { + if (pOutBitmap) { delete ge.GetBitmap(); ge.Create(strWidth, iTextHeight, FXDIB_Argb); ge.GetBitmap()->Clear(m_backgroundColor); @@ -284,7 +284,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, } else { CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)(m_Height - iTextHeight + iFontSize)); - if (matrix != NULL) { + if (matrix) { affine_matrix1.Concat(*matrix); } device->DrawNormalText(iLen, pCharPos, m_pFont, |