diff options
Diffstat (limited to 'xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp')
-rw-r--r-- | xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp index dcea777089..555b58643d 100644 --- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp +++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp @@ -167,14 +167,13 @@ uint8_t* CBC_OnedEAN13Writer::Encode(const CFX_ByteString& contents, return result; } -void CBC_OnedEAN13Writer::ShowChars( - const CFX_WideStringC& contents, - const CFX_RetainPtr<CFX_DIBitmap>& pOutBitmap, - CFX_RenderDevice* device, - const CFX_Matrix* matrix, - int32_t barWidth, - int32_t multiple, - int32_t& e) { +void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, + CFX_DIBitmap* pOutBitmap, + CFX_RenderDevice* device, + const CFX_Matrix* matrix, + int32_t barWidth, + int32_t multiple, + int32_t& e) { if (!device && !pOutBitmap) { e = BCExceptionIllegalArgument; return; @@ -279,6 +278,7 @@ void CBC_OnedEAN13Writer::ShowChars( CalcTextInfo(tempStr, pCharPos, m_pFont, (float)strWidth, iFontSize, blank); if (pOutBitmap) { + delete ge.GetBitmap(); ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr); ge.GetBitmap()->Clear(m_backgroundColor); ge.DrawNormalText(iLen, pCharPos, m_pFont, static_cast<float>(iFontSize), |