diff options
author | Nicolas Pena <npm@chromium.org> | 2017-06-29 12:02:06 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-06-29 20:50:09 +0000 |
commit | b21f174ad87e46c823c2ef8c11682167e2d12864 (patch) | |
tree | 79c3661672cbd2f84ee835f9922231bb90a634b3 /xfa/fwl | |
parent | 8ce58f522e046ae3b1561d592ca7b3cd7c894731 (diff) | |
download | pdfium-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 'xfa/fwl')
-rw-r--r-- | xfa/fwl/cfwl_widget.cpp | 5 | ||||
-rw-r--r-- | xfa/fwl/cfwl_widgetmgr.cpp | 7 |
2 files changed, 3 insertions, 9 deletions
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp index 172014da62..45ae9c0b0c 100644 --- a/xfa/fwl/cfwl_widget.cpp +++ b/xfa/fwl/cfwl_widget.cpp @@ -197,9 +197,8 @@ CFX_PointF CFWL_Widget::TransformTo(CFWL_Widget* pWidget, if (!parent) return ret; - CFX_Matrix m; - m.SetReverse(pWidget->GetMatrix()); - return m.Transform(ret) - pWidget->GetWidgetRect().TopLeft(); + return pWidget->GetMatrix().GetInverse().Transform(ret) - + pWidget->GetWidgetRect().TopLeft(); } CFX_Matrix CFWL_Widget::GetMatrix() { diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp index 67a63ba921..3abe14d89b 100644 --- a/xfa/fwl/cfwl_widgetmgr.cpp +++ b/xfa/fwl/cfwl_widgetmgr.cpp @@ -266,12 +266,7 @@ CFWL_Widget* CFWL_WidgetMgr::GetWidgetAtPoint(CFWL_Widget* parent, CFWL_Widget* child = GetLastChildWidget(parent); while (child) { if ((child->GetStates() & FWL_WGTSTATE_Invisible) == 0) { - CFX_Matrix m; - m.SetIdentity(); - - CFX_Matrix matrixOnParent; - m.SetReverse(matrixOnParent); - pos = m.Transform(point); + pos = parent->GetMatrix().GetInverse().Transform(point); CFX_RectF bounds = child->GetWidgetRect(); if (bounds.Contains(pos)) { |