summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
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 /fpdfsdk/fpdfxfa
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 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_page.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
index 24858f2f1a..87e003e147 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
@@ -143,12 +143,10 @@ void CPDFXFA_Page::DeviceToPage(int start_x,
if (!m_pPDFPage && !m_pXFAPageView)
return;
- CFX_Matrix device2page;
- device2page.SetReverse(
- GetDisplayMatrix(start_x, start_y, size_x, size_y, rotate));
-
- CFX_PointF pos = device2page.Transform(
- CFX_PointF(static_cast<float>(device_x), static_cast<float>(device_y)));
+ CFX_PointF pos = GetDisplayMatrix(start_x, start_y, size_x, size_y, rotate)
+ .GetInverse()
+ .Transform(CFX_PointF(static_cast<float>(device_x),
+ static_cast<float>(device_y)));
*page_x = pos.x;
*page_y = pos.y;