From b21f174ad87e46c823c2ef8c11682167e2d12864 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Thu, 29 Jun 2017 12:02:06 -0400 Subject: Change SetReverse to GetInverse in CFX_Matrix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CFX_Matrix::GetInverse is much clearer. Change-Id: Id10ab1723735332e1a78de853f28415ec3a4d834 Reviewed-on: https://pdfium-review.googlesource.com/7090 Reviewed-by: Lei Zhang Commit-Queue: Nicolás Peña --- xfa/fxfa/cxfa_ffwidget.cpp | 4 +--- xfa/fxfa/cxfa_rendercontext.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index 9de99255ab..f72b29127a 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp @@ -348,9 +348,7 @@ CFX_PointF CXFA_FFWidget::Rotate2Normal(const CFX_PointF& point) { if (mt.IsIdentity()) return point; - CFX_Matrix mtReverse; - mtReverse.SetReverse(mt); - return mtReverse.Transform(point); + return mt.GetInverse().Transform(point); } static void XFA_GetMatrix(CFX_Matrix& m, diff --git a/xfa/fxfa/cxfa_rendercontext.cpp b/xfa/fxfa/cxfa_rendercontext.cpp index 02c7cbb371..d709502ec8 100644 --- a/xfa/fxfa/cxfa_rendercontext.cpp +++ b/xfa/fxfa/cxfa_rendercontext.cpp @@ -14,9 +14,7 @@ CXFA_RenderContext::CXFA_RenderContext(CXFA_FFPageView* pPageView, const CFX_RectF& clipRect, const CFX_Matrix& matrix) : m_pWidget(nullptr), m_matrix(matrix), m_rtClipRect(clipRect) { - CFX_Matrix mtRes; - mtRes.SetReverse(matrix); - mtRes.TransformRect(m_rtClipRect); + matrix.GetInverse().TransformRect(m_rtClipRect); m_pWidgetIterator = pPageView->CreateWidgetIterator( XFA_TRAVERSEWAY_Form, -- cgit v1.2.3