diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-09 09:17:20 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-09 15:04:51 +0000 |
commit | 1b08df18300bbc67dabd12fb35ab6ce1732a1024 (patch) | |
tree | 9773931c8d18709860c9fbc1177e290e7713044e /xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp | |
parent | ac2e04797b258115b2dc768a56377d7e78038f42 (diff) | |
download | pdfium-1b08df18300bbc67dabd12fb35ab6ce1732a1024.tar.xz |
Convert Get methods to return instead of using out params.
This Cl changes several Get methods to return their values instead of using
out parameters.
Change-Id: Ie9a930a5c2d0e809f2d7181ca033d801945c1cf9
Reviewed-on: https://pdfium-review.googlesource.com/2556
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp')
-rw-r--r-- | xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp index d4b21a8325..bcbc80a61d 100644 --- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp +++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp @@ -233,8 +233,9 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr); FX_RECT rect(0, 0, strWidth, iTextHeight); ge.FillRect(&rect, m_backgroundColor); - ge.DrawNormalText(iLen, pCharPos + 1, m_pFont, (FX_FLOAT)iFontSize, - &affine_matrix, m_fontColor, FXTEXT_CLEARTYPE); + ge.DrawNormalText(iLen, pCharPos + 1, m_pFont, + static_cast<FX_FLOAT>(iFontSize), &affine_matrix, + m_fontColor, FXTEXT_CLEARTYPE); geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight); } else { CFX_Matrix affine_matrix1(1.0, 0.0, 0.0, -1.0, @@ -243,8 +244,9 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, if (matrix) { affine_matrix1.Concat(*matrix); } - device->DrawNormalText(iLen, pCharPos + 1, m_pFont, (FX_FLOAT)iFontSize, - &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE); + device->DrawNormalText(iLen, pCharPos + 1, m_pFont, + static_cast<FX_FLOAT>(iFontSize), &affine_matrix1, + m_fontColor, FXTEXT_CLEARTYPE); } tempStr = str.Mid(7, 6); iLen = tempStr.GetLength(); @@ -253,8 +255,9 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, if (pOutBitmap) { FX_RECT rect1(0, 0, strWidth, iTextHeight); ge.FillRect(&rect1, m_backgroundColor); - ge.DrawNormalText(iLen, pCharPos + 7, m_pFont, (FX_FLOAT)iFontSize, - &affine_matrix, m_fontColor, FXTEXT_CLEARTYPE); + ge.DrawNormalText(iLen, pCharPos + 7, m_pFont, + static_cast<FX_FLOAT>(iFontSize), &affine_matrix, + m_fontColor, FXTEXT_CLEARTYPE); geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 47 * multiple, m_Height - iTextHeight); } else { @@ -265,8 +268,9 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, if (matrix) { affine_matrix1.Concat(*matrix); } - device->DrawNormalText(iLen, pCharPos + 7, m_pFont, (FX_FLOAT)iFontSize, - &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE); + device->DrawNormalText(iLen, pCharPos + 7, m_pFont, + static_cast<FX_FLOAT>(iFontSize), &affine_matrix1, + m_fontColor, FXTEXT_CLEARTYPE); } tempStr = str.Mid(0, 1); iLen = tempStr.GetLength(); @@ -280,7 +284,7 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, delete ge.GetBitmap(); ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr); ge.GetBitmap()->Clear(m_backgroundColor); - ge.DrawNormalText(iLen, pCharPos, m_pFont, (FX_FLOAT)iFontSize, + ge.DrawNormalText(iLen, pCharPos, m_pFont, static_cast<FX_FLOAT>(iFontSize), &affine_matrix, m_fontColor, FXTEXT_CLEARTYPE); geBitmap.SetDIBits(ge.GetBitmap(), 0, m_Height - iTextHeight); } else { @@ -289,8 +293,9 @@ void CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents, if (matrix) { affine_matrix1.Concat(*matrix); } - device->DrawNormalText(iLen, pCharPos, m_pFont, (FX_FLOAT)iFontSize, - &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE); + device->DrawNormalText(iLen, pCharPos, m_pFont, + static_cast<FX_FLOAT>(iFontSize), &affine_matrix1, + m_fontColor, FXTEXT_CLEARTYPE); } FX_Free(pCharPos); } |