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 --- fpdfsdk/formfiller/cffl_formfiller.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'fpdfsdk/formfiller') diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp index 526f4b947d..565d2babdd 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.cpp +++ b/fpdfsdk/formfiller/cffl_formfiller.cpp @@ -459,28 +459,19 @@ CFX_FloatRect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) { } CFX_FloatRect CFFL_FormFiller::FFLtoPWL(const CFX_FloatRect& rect) { - CFX_Matrix mt; - mt.SetReverse(GetCurMatrix()); - CFX_FloatRect temp = rect; - mt.TransformRect(temp); - + GetCurMatrix().GetInverse().TransformRect(temp); return temp; } CFX_FloatRect CFFL_FormFiller::PWLtoFFL(const CFX_FloatRect& rect) { - CFX_Matrix mt = GetCurMatrix(); - CFX_FloatRect temp = rect; - mt.TransformRect(temp); - + GetCurMatrix().TransformRect(temp); return temp; } CFX_PointF CFFL_FormFiller::FFLtoPWL(const CFX_PointF& point) { - CFX_Matrix mt; - mt.SetReverse(GetCurMatrix()); - return mt.Transform(point); + return GetCurMatrix().GetInverse().Transform(point); } CFX_PointF CFFL_FormFiller::PWLtoFFL(const CFX_PointF& point) { -- cgit v1.2.3