summaryrefslogtreecommitdiff
path: root/fpdfsdk/cfx_systemhandler.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-21 12:56:24 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-21 19:05:18 +0000
commit1f403cee9478021862c7cc4e516907bd51e8f0f6 (patch)
tree57829fa3b036ee9ddd57a8ad5b3541fe4e96fdb8 /fpdfsdk/cfx_systemhandler.cpp
parent04557b8a7c2d3dab06fe9eadacc3c7744b3e14e2 (diff)
downloadpdfium-1f403cee9478021862c7cc4e516907bd51e8f0f6.tar.xz
Convert more TransformPoint calls to Transform
This Cl converts several uses of TransformPoint to use Transform(CFX_PointF). Change-Id: I9bc3c484e0a4304b904584218bd9e59dec7db727 Reviewed-on: https://pdfium-review.googlesource.com/2791 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'fpdfsdk/cfx_systemhandler.cpp')
-rw-r--r--fpdfsdk/cfx_systemhandler.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/fpdfsdk/cfx_systemhandler.cpp b/fpdfsdk/cfx_systemhandler.cpp
index 966dd63d4c..8ccbd75fbf 100644
--- a/fpdfsdk/cfx_systemhandler.cpp
+++ b/fpdfsdk/cfx_systemhandler.cpp
@@ -46,14 +46,12 @@ void CFX_SystemHandler::InvalidateRect(CPDFSDK_Widget* widget, FX_RECT rect) {
CFX_Matrix device2page;
device2page.SetReverse(page2device);
- FX_FLOAT left = static_cast<FX_FLOAT>(rect.left);
- FX_FLOAT top = static_cast<FX_FLOAT>(rect.top);
- FX_FLOAT right = static_cast<FX_FLOAT>(rect.right);
- FX_FLOAT bottom = static_cast<FX_FLOAT>(rect.bottom);
- device2page.TransformPoint(left, top);
- device2page.TransformPoint(right, bottom);
-
- CFX_FloatRect rcPDF(left, bottom, right, top);
+ CFX_PointF left_top = device2page.Transform(CFX_PointF(
+ static_cast<FX_FLOAT>(rect.left), static_cast<FX_FLOAT>(rect.top)));
+ CFX_PointF right_bottom = device2page.Transform(CFX_PointF(
+ static_cast<FX_FLOAT>(rect.right), static_cast<FX_FLOAT>(rect.bottom)));
+
+ CFX_FloatRect rcPDF(left_top.x, right_bottom.y, right_bottom.x, left_top.y);
rcPDF.Normalize();
m_pFormFillEnv->Invalidate(pPage, rcPDF.left, rcPDF.top, rcPDF.right,