summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_wnd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_wnd.cpp')
-rw-r--r--fpdfsdk/pdfwindow/cpwl_wnd.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.cpp b/fpdfsdk/pdfwindow/cpwl_wnd.cpp
index a8b5c31254..85a610eea5 100644
--- a/fpdfsdk/pdfwindow/cpwl_wnd.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_wnd.cpp
@@ -765,7 +765,9 @@ CFX_PointF CPWL_Wnd::ParentToChild(const CFX_PointF& point) const {
if (mt.IsIdentity())
return point;
- mt.SetReverse(mt);
+ CFX_Matrix inverse = mt.GetInverse();
+ if (!inverse.IsIdentity())
+ mt = inverse;
return mt.Transform(point);
}
@@ -774,7 +776,9 @@ CFX_FloatRect CPWL_Wnd::ParentToChild(const CFX_FloatRect& rect) const {
if (mt.IsIdentity())
return rect;
- mt.SetReverse(mt);
+ CFX_Matrix inverse = mt.GetInverse();
+ if (!inverse.IsIdentity())
+ mt = inverse;
CFX_FloatRect rc = rect;
mt.TransformRect(rc);
return rc;