diff options
author | Jane Liu <janeliulwq@google.com> | 2017-08-22 10:50:06 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-22 16:42:55 +0000 |
commit | 878b27de2fa8e5bdc3b910c98846f4b43185d4aa (patch) | |
tree | f21a9528354ebf533a637f5ea0e8edaa44be7427 /fxbarcode/oned/BC_OnedUPCAWriter.cpp | |
parent | aac59a0e59052366e260396165a759b5b0e80188 (diff) | |
download | pdfium-878b27de2fa8e5bdc3b910c98846f4b43185d4aa.tar.xz |
Converted CFX_Matrix::TransformRect() to take in consts
Currently, all three of CFX_Matrix::TransformRect() take in rect values
and modify them in place.
This CL converts them to take in constant values and return the
transformed values instead, and fixes all the call sites.
Bug=pdfium:874
Change-Id: I9c274df3b14e9d88c100ba0530068e06e8fec32b
Reviewed-on: https://pdfium-review.googlesource.com/11550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
Diffstat (limited to 'fxbarcode/oned/BC_OnedUPCAWriter.cpp')
-rw-r--r-- | fxbarcode/oned/BC_OnedUPCAWriter.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/fxbarcode/oned/BC_OnedUPCAWriter.cpp index fff4184221..07c3e7f174 100644 --- a/fxbarcode/oned/BC_OnedUPCAWriter.cpp +++ b/fxbarcode/oned/BC_OnedUPCAWriter.cpp @@ -127,8 +127,7 @@ bool CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents, CFX_FloatRect rect((float)leftPosition, (float)(m_Height - iTextHeight), (float)(leftPosition + strWidth - 0.5), (float)m_Height); matr.Concat(*matrix); - matr.TransformRect(rect); - FX_RECT re = rect.GetOuterRect(); + FX_RECT re = matr.TransformRect(rect).GetOuterRect(); device->FillRect(&re, m_backgroundColor); CFX_Matrix matr1(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0); CFX_FloatRect rect1((float)(leftPosition + 40 * multiple), @@ -136,16 +135,14 @@ bool CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents, (float)((leftPosition + 40 * multiple) + strWidth - 0.5), (float)m_Height); matr1.Concat(*matrix); - matr1.TransformRect(rect1); - re = rect1.GetOuterRect(); + re = matr1.TransformRect(rect1).GetOuterRect(); device->FillRect(&re, m_backgroundColor); float strWidth1 = (float)multiple * 7; CFX_Matrix matr2(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0); CFX_FloatRect rect2(0.0, (float)(m_Height - iTextHeight), (float)strWidth1 - 1, (float)m_Height); matr2.Concat(*matrix); - matr2.TransformRect(rect2); - re = rect2.GetOuterRect(); + re = matr2.TransformRect(rect2).GetOuterRect(); device->FillRect(&re, m_backgroundColor); CFX_Matrix matr3(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0); CFX_FloatRect rect3((float)(leftPosition + 85 * multiple), @@ -153,8 +150,7 @@ bool CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents, (float)((leftPosition + 85 * multiple) + strWidth1 - 0.5), (float)m_Height); matr3.Concat(*matrix); - matr3.TransformRect(rect3); - re = rect3.GetOuterRect(); + re = matr3.TransformRect(rect3).GetOuterRect(); device->FillRect(&re, m_backgroundColor); strWidth = strWidth * m_outputHScale; |