summaryrefslogtreecommitdiff
path: root/core/fpdftext/cpdf_textpage.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-06-29 12:02:06 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-29 20:50:09 +0000
commitb21f174ad87e46c823c2ef8c11682167e2d12864 (patch)
tree79c3661672cbd2f84ee835f9922231bb90a634b3 /core/fpdftext/cpdf_textpage.cpp
parent8ce58f522e046ae3b1561d592ca7b3cd7c894731 (diff)
downloadpdfium-b21f174ad87e46c823c2ef8c11682167e2d12864.tar.xz
Change SetReverse to GetInverse in CFX_Matrix
CFX_Matrix::GetInverse is much clearer. Change-Id: Id10ab1723735332e1a78de853f28415ec3a4d834 Reviewed-on: https://pdfium-review.googlesource.com/7090 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdftext/cpdf_textpage.cpp')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index b8860122f1..b6b3a0dbce 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -264,10 +264,7 @@ std::vector<CFX_FloatRect> CPDF_TextPage::GetRectArray(int start,
CFX_Matrix matrix = info_curchar.m_pTextObj->GetTextMatrix();
matrix.Concat(info_curchar.m_Matrix);
- CFX_Matrix matrix_reverse;
- matrix_reverse.SetReverse(matrix);
-
- CFX_PointF origin = matrix_reverse.Transform(info_curchar.m_Origin);
+ CFX_PointF origin = matrix.GetInverse().Transform(info_curchar.m_Origin);
rect.left = info_curchar.m_CharBox.left;
rect.right = info_curchar.m_CharBox.right;
if (pCurObj->GetFont()->GetTypeDescent()) {
@@ -1306,8 +1303,7 @@ CPDF_TextPage::GenerateCharacter CPDF_TextPage::ProcessInsertObject(
CFX_Matrix prev_matrix = m_pPreTextObj->GetTextMatrix();
prev_matrix.Concat(m_perMatrix);
- CFX_Matrix prev_reverse;
- prev_reverse.SetReverse(prev_matrix);
+ CFX_Matrix prev_reverse = prev_matrix.GetInverse();
CFX_PointF pos = prev_reverse.Transform(formMatrix.Transform(pObj->GetPos()));
if (last_width < this_width)