summaryrefslogtreecommitdiff
path: root/fpdfsdk/cfx_systemhandler.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-09 13:07:43 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-09 19:02:55 +0000
commitafb44560a21298b3588b36cbaf45e2be50f2e75b (patch)
tree21f3ececad017e6be64a19c4370cfe9fd7f9c29c /fpdfsdk/cfx_systemhandler.cpp
parent67e4faaf8be0aebc67ebfb96d33933d9f9119d20 (diff)
downloadpdfium-afb44560a21298b3588b36cbaf45e2be50f2e75b.tar.xz
Remove Transform in favour of TransformPoint
This CL removes the two Transform() overrides from CFX_Matrix and calls the TransformPoint methods directly. In the case of the 4 param version the values were assigned to the out values before calling. Change-Id: Id633826caec75b848774dcda6cfdcef2dbf5a7db Reviewed-on: https://pdfium-review.googlesource.com/2573 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/cfx_systemhandler.cpp')
-rw-r--r--fpdfsdk/cfx_systemhandler.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/fpdfsdk/cfx_systemhandler.cpp b/fpdfsdk/cfx_systemhandler.cpp
index f38be4c3e8..b897a3e0bb 100644
--- a/fpdfsdk/cfx_systemhandler.cpp
+++ b/fpdfsdk/cfx_systemhandler.cpp
@@ -46,14 +46,13 @@ void CFX_SystemHandler::InvalidateRect(CPDFSDK_Widget* widget, FX_RECT rect) {
CFX_Matrix device2page;
device2page.SetReverse(page2device);
- FX_FLOAT left;
- FX_FLOAT top;
- FX_FLOAT right;
- FX_FLOAT bottom;
- device2page.Transform(static_cast<FX_FLOAT>(rect.left),
- static_cast<FX_FLOAT>(rect.top), left, top);
- device2page.Transform(static_cast<FX_FLOAT>(rect.right),
- static_cast<FX_FLOAT>(rect.bottom), right, bottom);
+ 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);
rcPDF.Normalize();